void picpr(Package *p) { int i, orient; Plane *pl; if(npkg){ for(i=0; i<npkg; i++) if(strcmp(p->name, pkgnames[i]) == 0) break; if(i >= npkg) return; } fprint(1, ".sp 2i\n"); fprint(1, ".PS 6.0\n"); fprint(1, "boxwid=20\n"); fprint(1, "boxht=20\n"); fprint(1, "define pin X\n"); fprint(1, "box invis \"\\(bu\" at $1,$2\n"); fprint(1, "\"\\s-2$3\\s0\" $4 at last box.$5\n"); fprint(1, "X\n"); fprint(1, "line from -30,0 to 30,0\n"); fprint(1, "line from 0,-30 to 0,30\n"); if (!bflag) fprint(1, "\"%s\" at %d,%d\n", p->name, (p->r.min.x+p->r.max.x)/2, p->r.max.y+100); else fprint(1, "\"%s\" \"(bottom)\" at %d,%d\n", p->name, -(p->r.min.x+p->r.max.x)/2, p->r.max.y+100); dorect(p->r); if(gflag) dogrid(p->r); for(i = 0; i < p->npins; i++){ orient = 3; /* west for now */ if (!bflag) fprint(1, "pin(%d,%d,%d,%s,%c)\n", p->pins[i].p.x, p->pins[i].p.y, i+p->pmin, adj[orient], dir[orient]); else fprint(1, "pin(%d,%d,%d,%s,%c)\n", -p->pins[i].p.x, p->pins[i].p.y, i+p->pmin, adj[orient], dir[orient]); } for(i=0; i < p->ndrills; i++){ fprint(1, "circlerad=%d\n", RAD(p->drills[i].drill)); if (!bflag) fprint(1, "circle at %d,%d\n", p->drills[i].p.x, p->drills[i].p.y); else fprint(1, "circle at %d,%d\n", -p->drills[i].p.x, p->drills[i].p.y); } for(i=0; i < p->ncutouts; i++){ pl = &p->cutouts[i]; dorect(pl->r); } fprint(1, ".PE\n"); }
void lcd_update (int led, int on) { int track, x, y; if (!inited) return; if (led < 0) { lgLcdUpdateBitmap (device, lbh, LGLCD_PRIORITY_IDLE_NO_SHOW); return; } if (on < 0) return; if (led >= 1 && led <= 4) { x = 23 + (led - 1) * 40; y = 17; track = gui_data.drive_track[led - 1]; if (gui_data.drive_disabled[led - 1]) { track = -1; on = 0; } putnumbers (x, y, track, on); } else if (led == 0) { dorect (&coords[4 * 2], on); } else if (led == 5) { dorect (&coords[4 * 1], on); } else if (led == 6) { dorect (&coords[4 * 0], on); } else if (led == 7) { y = 2; x = 125; putnumbers (x, y, gui_data.fps <= 999 ? (gui_data.fps + 5) / 10 : 99, 0); } else if (led == 8) { y = 2; x = 98; putnumbers (x, y, gui_data.idle <= 999 ? gui_data.idle / 10 : 99, 0); } lgLcdUpdateBitmap (device, lbh, LGLCD_ASYNC_UPDATE (LGLCD_PRIORITY_NORMAL + 1)); }