hardware: the cell bits become a dial, with a wedge marking the LSB
ci / linux-arm64 (push) Successful in 4m46s
ci / linux-arm64 (push) Successful in 4m46s
The eight bit lamps are no longer a block of two rows: they sit on a circle, the same visual language as the 64 cell ring, so the panel reads as two dials of different size. bit 7 is at twelve o'clock and bits run clockwise, which puts bit 0 -- the LSB, the only bit biz and rnz ever look at -- at half past ten, and that one gets an engraved wedge pointing at it plus a small 0. On the real panel the wedge is a notch in the lamp bezel rather than a printed mark. Lamps of 6.2 mm on a 22.8 mm circle leave three millimetres between neighbours, so the dial stays legible at arms length. Buttons moved down a little to clear it.
This commit is contained in:
1 parent
c70c822afc
commit
9693c3eb88
2 files changed
+31
-12
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 54 KiB |
@@ -73,19 +73,38 @@ def main():
|
||||
font=font(1.3), fill=ENGRAVE_DIM)
|
||||
d.line([p(12), p(21.5), p(MID), p(21.5)], fill=RULE, width=p(0.25))
|
||||
|
||||
# ---- column 1: the pointed cell ----------------------------------------
|
||||
head(d, CX[0], 24.4, "CELL BITS 7 6 5 4 / 3 2 1 0")
|
||||
for i, bit in enumerate([1, 0, 0, 1, 1, 0, 1, 0]):
|
||||
x = CX[0] + (i % 4) * 13.0
|
||||
y = ROW[0] + (i // 4) * 14.0
|
||||
# ---- column 1: the pointed cell, eight lamps on a dial -------------------
|
||||
# Same visual language as the 64 cell ring: a circle of lamps. bit 7 sits at
|
||||
# twelve o'clock and bits run clockwise, so bit 0 (the LSB, the one biz and
|
||||
# rnz look at) lands at half past ten, marked with a wedge.
|
||||
head(d, CX[0], 23.6, "CELL")
|
||||
ccx, ccy, cr = CX[0] + 28.0, 39.0, 11.4
|
||||
d.ellipse([p(ccx - cr), p(ccy - cr), p(ccx + cr), p(ccy + cr)],
|
||||
outline=(52, 57, 62), width=p(0.25))
|
||||
bits = [1, 0, 0, 1, 1, 0, 1, 0] # bit 7 .. bit 0
|
||||
lr = 3.0 # lamp radius
|
||||
for i, bit in enumerate(bits):
|
||||
a = -math.pi / 2 + 2 * math.pi * i / 8
|
||||
px, py = ccx + cr * math.cos(a), ccy + cr * math.sin(a)
|
||||
if bit:
|
||||
g.ellipse([p(x - 0.9), p(y - 0.9), p(x + 8.9), p(y + 8.9)],
|
||||
fill=BULB + (200,))
|
||||
d.ellipse([p(x + 0.6), p(y + 0.6), p(x + 7.4), p(y + 7.4)], fill=BULB,
|
||||
g.ellipse([p(px - lr * 1.35), p(py - lr * 1.35),
|
||||
p(px + lr * 1.35), p(py + lr * 1.35)], fill=BULB + (200,))
|
||||
d.ellipse([p(px - lr), p(py - lr), p(px + lr), p(py + lr)], fill=BULB,
|
||||
outline=(122, 90, 34), width=p(0.3))
|
||||
else:
|
||||
d.ellipse([p(x + 0.6), p(y + 0.6), p(x + 7.4), p(y + 7.4)],
|
||||
d.ellipse([p(px - lr), p(py - lr), p(px + lr), p(py + lr)],
|
||||
fill=(38, 34, 28), outline=(72, 67, 57), width=p(0.3))
|
||||
# the LSB wedge, just outside the bit 0 lamp, apex pointing at it
|
||||
a0 = -math.pi / 2 + 2 * math.pi * 7 / 8
|
||||
ux, uy = math.cos(a0), math.sin(a0)
|
||||
tip = (ccx + (cr + lr + 0.5) * ux, ccy + (cr + lr + 0.5) * uy)
|
||||
base = (ccx + (cr + lr + 4.2) * ux, ccy + (cr + lr + 4.2) * uy)
|
||||
nx, ny = -uy, ux
|
||||
d.polygon([(p(tip[0]), p(tip[1])),
|
||||
(p(base[0] + 1.9 * nx), p(base[1] + 1.9 * ny)),
|
||||
(p(base[0] - 1.9 * nx), p(base[1] - 1.9 * ny))], fill=ENGRAVE_DIM)
|
||||
d.text((p(base[0] + 2.4 * nx - 1.0), p(base[1] + 2.4 * ny - 0.8)), "0",
|
||||
font=font(1.4), fill=ENGRAVE_DIM)
|
||||
|
||||
# ---- column 2: instruction lamps, then dp bits --------------------------
|
||||
head(d, CX[1], 24.4, "INSTRUCTION")
|
||||
@@ -138,12 +157,12 @@ def main():
|
||||
|
||||
# ---- row 2: controls ----------------------------------------------------
|
||||
for cx_, label in ((18.0, "RUN"), (34.0, "STEP"), (50.0, "RESET")):
|
||||
d.ellipse([p(cx_ - 4.6), p(ROW[1] - 4.6), p(cx_ + 4.6), p(ROW[1] + 4.6)],
|
||||
d.ellipse([p(cx_ - 4.6), p(58.5 - 4.6), p(cx_ + 4.6), p(58.5 + 4.6)],
|
||||
fill=CHROME, outline=(96, 96, 98), width=p(0.25))
|
||||
d.ellipse([p(cx_ - 3.8), p(ROW[1] - 3.8), p(cx_ + 3.8), p(ROW[1] + 3.8)],
|
||||
d.ellipse([p(cx_ - 3.8), p(58.5 - 3.8), p(cx_ + 3.8), p(58.5 + 3.8)],
|
||||
fill=BAKELITE, outline=(38, 18, 16), width=p(0.25))
|
||||
tw = d.textlength(label, font=font(1.4))
|
||||
d.text((p(cx_) - tw / 2, p(ROW[1] + 5.4)), label, font=font(1.4), fill=ENGRAVE)
|
||||
d.text((p(cx_) - tw / 2, p(58.5 + 5.4)), label, font=font(1.4), fill=ENGRAVE)
|
||||
|
||||
head(d, CX[1], ROW[1] - 3.6, "INPUT BYTE")
|
||||
d.rounded_rectangle([p(CX[1]), p(ROW[1] + 0.2), p(CX[1] + 44), p(ROW[1] + 7.4)],
|
||||
|
||||
Reference in new issue
Block a user