tools/wiring_test.py)Checks newly wired switches and coils against the real machine: continuity for switches, and a
driver pulse for coils so the CobraPin board's per-channel activation LED can be checked
with the 50V supply off. That LED lights when a driver output switches at logic level, whether
or not high voltage is connected, so a wrong coil-driver connection shows up before it can blow a
FET, coil or fuse (docs/opp-hardware-reference.md: "test without coil power first"). For the
step-by-step bench process this fits into, see Wiring workflow.
Start MPF against the real hardware first (check it's safe to power the cabinet), from a
PowerShell shell:
tools\mpf-session.ps1 -Action Start -NoBcp -Probe
Then:
.venv\Scripts\python.exe tools\wiring_test.py --monitor # watch every switch live
.venv\Scripts\python.exe tools\wiring_test.py # test the flipper pair
.venv\Scripts\python.exe tools\wiring_test.py --switches s-a,s-b --coils c-x
.venv\Scripts\python.exe tools\wiring_test.py --switches s-a --coils "" # switches only
.venv\Scripts\python.exe tools\wiring_test.py --switches "" --coils c-x --pulse-ms 200 # real motion, HV on
--monitor prints every switch's state, then each open/close as it happens. Tap a freshly-Probe, every input no real switch uses is a temporaryprobe-<number> switch (tools/wiring_probe.py), so a tap on a new switch printsNEW INPUT <number>; without it, only switches already in hardware-switches.yaml show up.default_pulse_ms, or--pulse-ms) and asks whether the LED lit.--switches and --coils each default to the flipper pair, so pass --coils "" for a--switches "" for coils only).--monitor runs askIt doesn't talk to the hardware itself. MPF 0.80 runs a BCP service server on 127.0.0.1:5051,
and the script drives the same service commands the interactive mpf service CLI uses
(list_switches, list_coils, coil_pulse <name> [pulse_ms:N], and the monitor_start switch
push for --monitor) through MPF's own AsyncioBcpClientSocket. It sends service start first,
which puts MPF into its service mode (attract/game logic paused), and always sends stop on exit.
-NoBcp is required. Without it MPF waits forever for its outbound BCP connection to arequired: True in MPF's mpfconfig.yaml) and never starts the service server, solocalhost:5051 refuses connections. -NoBcp only drops that outbound connection.--monitor from outside (e.g. a shell timeout). Its service stop cleanupAssertionError: Already in service mode!. Exit with Ctrl+C, or restart the MPF session.ClearCommError failed ... PermissionError(13, ...) about 70 s after the last activity. Fixedpowercfg (USB settings subgroup 2a737441-1930-4402-8d77-b2bebba308a3, setting48e6b7a6-50f5-4782-a5d4-53bb8f07e226). It's an OS setting, so a reimage or a new power plandefault_pulse_ms: 25 lit the LED with HV off but gave no visible travel with HV on; --pulse-ms 200 moved them.TODO.md).switch{"name": "s-start", "state": 1}, then 0) that goes through the same code path as as-starts-launch were wired; the Godot display's [keyboard] mapping in gmc.cfg uses the same