Add Pac-Man power-on flow and document Odin integration

- Add a four-second arcade-style boot sequence followed by the
  Character / Nickname introduction.
- Separate cabinet power-on from RFID credit and player Start.
- Add operator Power on control and cabinet power-state reporting.
- Prevent repeated power commands from restarting boot or gameplay.
- Ignore RFID scans received before the cabinet is ready.
- Add power-state, RFID, controller, and GPIO feedback regression tests.

- Expand the master walkthrough with export, packaging, file transfer,
  fresh-Pi setup, RFID compilation, and end-to-end testing instructions.
- Correct tester hardware documentation: BCM23/J20 drives an LED;
  physical buttons connect through a separate I2C1 input board.
- Document operator-triggered power-on as the current test workflow
  and retain the temporary 2.4 configuration compatibility notes.
- Record successful physical testing of power-on, RFID credit,
  and player Start.

- Add an Odin integration README describing the proposed Rust/NATS
  bridge, shared messages, Flutter GM interface, autopilot sequencing,
  hardware ownership, and Starfish SSH-management role.
- Define migration milestones and information needed from the
  framework owner; link the integration guide from the root README.

Validation: 69 controller tests, 10 GPIO tests, Pac-Man power/RFID
checks, managed-cabinet lifecycle checks, and visual screen inspection.
This commit is contained in:
Jeff Luke committed 2026-10-17 18:47:26 -07:00
1 parent c1b2195834
commit 41ef12f954
27 files changed
+577 -48

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
extends SceneTree
func _initialize() -> void: call_deferred("run")
func run() -> void:
var agent = load("res://tests/pcb/power_agent.gd").new()
root.add_child(agent)
agent.session = "test"
agent.boot = "test"
agent.cabinet = load("res://data/cabinets/cabinet_01.tres")
await agent.execute({"id": "prepare", "session": "test", "type": "prepare", "game": "pacman", "game_config": {"power_on_device": "cab1_btn_ylw", "rfid_credit_device": "cab1_rfid1"}})
assert(agent.phase == "powered_off")
assert(agent.outcomes.prepare.ok)
agent.game.set_physics_process(false)
await agent.execute({"id": "power", "session": "test", "type": "power_on"})
assert(agent.phase == "booting" and agent.outcomes.power.ok)
agent.game._physics_process(2.0)
await agent.execute({"id": "power", "session": "test", "type": "power_on"})
assert(agent.game.boot_elapsed == 2.0, "Duplicate commands must not restart boot")
agent.game._physics_process(2.0)
assert(agent.phase == "ready")
assert(agent.reports.any(func(r): return r.get("event") == "power_ready"))
await agent.execute({"id": "reset", "session": "test", "type": "reset"})
assert(agent.phase == "idle" and agent.game == null)
agent.queue_free()
await process_frame
print("MANAGED PACMAN POWER: PASS")
quit()