Expand Glitch operations hub, cabinet authoring, deployment, and RFID support

Operator hub
- Introduce Escape Gallery branding and Glitch: the Dark Machine room views
- Add cabinet illustrations, Pac-Man marquee/gameplay artwork, and waiting states
- Add device feedback panels with RFID readings, input/output states, and stale status
- Add logged operator hardware interventions with request deduplication

Room and cabinet authoring
- Add a visual custom-PCB connection editor with per-cabinet device inventory
- Support device IDs, bindings, wiring notes, input polarity, and validation
- Add physical-room label/dimension toggles and editable doorway annotations
- Preserve doorway changes through undo, save, and revert
- Expand cabinet profiles, room layout, and Glitch scenario resources

Scenarios and gameplay
- Add per-assignment game configuration and runtime feature validation
- Add timed test wins and Frogger individual-home objectives
- Add the three-cabinet timed/score/Frogger test scenario
- Add Cabinet 1 Pac-Man RFID credits, credit sound, and CREDIT 0/1 display
- Require physical Start after an accepted scan and prevent duplicate credits

Pi hardware and deployment
- Add GPIO feedback sampling and a separate multiplexed RFID helper
- Validate reader pin ownership and input/output conflicts
- Add SSH cabinet startup and Pi desktop-session service support
- Add master packaging, site setup, SSH enrollment, and staged cabinet releases
- Verify deployment manifests and support explicit activation/status/log commands

Documentation and verification
- Consolidate the root README around the current architecture and setup workflow
- Add the complete master/Pi/RFID export and deployment walkthrough
- Document network isolation, credentials, card identification, and rollback
- Add PCB, room-editor, feedback, credit, deployment, and controller tests
- Isolate protocol tests from designer-edited cabinet configurations

Known limitations
- RFID helper compilation and physical Pi commissioning remain unverified
- Fleet provisioning does not yet configure RFID-only installations completely
- Broader Pac-Man tests retain a ghost-capture assertion failure
- Staged exports must be rebuilt and checked before deploying runtime 2.3
This commit is contained in:
Jeff Luke committed 2026-10-17 14:53:54 -07:00
1 parent 705ec31e0b
commit c1b2195834
90 files changed
+4969 -456

No files matched your search

+13 -6
View File
@@ -103,7 +103,7 @@ class Outputs:
self.ledger.close()
def handler_for(outputs):
def handler_for(outputs, feedback=None):
class Handler(BaseHTTPRequestHandler):
def do_POST(self):
try:
@@ -115,7 +115,7 @@ def handler_for(outputs):
data = json.loads(self.rfile.read(length) or b"{}")
if self.path == "/heartbeat":
outputs.heartbeat()
result = {"ok": True}
result = {"ok": True, "feedback": feedback.snapshot() if feedback else {"devices": [], "events": []}}
elif self.path == "/output":
result = outputs.command(data)
print("GPIO:", data, flush=True)
@@ -142,14 +142,19 @@ def main():
parser.add_argument("--controller", default="cabinet_01_gpio")
parser.add_argument("--pins", default="17", help="BCM pin allowlist, comma separated")
parser.add_argument("--ledger", default=str(Path.home() / ".local/state/arcade_gpio/requests.sqlite3"))
parser.add_argument("--devices", help="Explicit PCB feedback JSON inventory")
parser.add_argument("--rfid-helper", help="Built arcade-rfid helper executable")
args = parser.parse_args()
pins = [int(n) for n in args.pins.split(",")]
if not pins or any(pin < 0 or pin > 27 for pin in pins):
pins = [int(n) for n in args.pins.split(",") if n.strip()]
if len(set(pins)) != len(pins) or any(pin < 0 or pin > 27 for pin in pins):
parser.error("Use BCM header GPIO numbers 0..27")
from gpiozero import OutputDevice
from gpiozero import OutputDevice, Button
from device_feedback import Feedback, load_devices
definitions = load_devices(args.devices, pins) if args.devices else []
Path(args.ledger).parent.mkdir(parents=True, exist_ok=True)
outputs = Outputs(OutputDevice, args.controller, pins, ledger=args.ledger)
server = HTTPServer(("127.0.0.1", 8765), handler_for(outputs))
feedback = Feedback(definitions, Button, outputs, args.rfid_helper)
server = HTTPServer(("127.0.0.1", 8765), handler_for(outputs, feedback))
server.timeout = .05
stop = threading.Event()
signal.signal(signal.SIGTERM, lambda *_: stop.set())
@@ -158,6 +163,7 @@ def main():
def watchdog():
while not stop.wait(.02):
outputs.tick()
feedback.tick()
worker = threading.Thread(target=watchdog, daemon=True)
worker.start()
@@ -168,6 +174,7 @@ def main():
finally:
stop.set()
worker.join()
feedback.close()
outputs.close()
server.server_close()