I'm slowly starting to get my head around this.
At the moment I'm trying to print out the state of switch SD7 which fipperLwR is set to.
I noticed Mode has a add_switch_handler so I've changed the script to test like so:
game = procgame.game.GameController(machine_type=pinproc.MachineTypePDB)
game.lamps.VUK_right_r.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
print switch.name + ' : ' + str(switch.state)
testMode = procgame.game.Mode(game,5)
testSwitch = game.switches.flipperLwR.name
Unfortunately I'm not seeing any change. Is this the correct way to test a switch ?
I've also tried printing game.switches.flipperLwR.state and I can see the value changes, but only once. I'm guessing I need to add some of the event handler/callback for the main game loop ? If so, how would I do that ?