In an effort to keep things moving, I started working on a custom script for this (I figured I could at least learn something while I wait), but I'm stuck dealing with futures. I get what they are in concept, but I've never worked with them before and I'm just not sure where to go with this. Here's what I have so far...
The list of switches are the switches that will kill the extra ball if they get hit. The switch_controller.wait_for_any_switch() should (eventually) give me the switch from that list that first goes active for at least 1ms, but it's in the form of a Future, which I guess makes sense given that it's a wait and see thing. However, I can't find an example of dealing with futures on the intertubes that helps me to understand what to do next in this particular scenario (or I'm too dense to grasp what they're trying to show me). How do I go from awaiting the future's response to capturing the switch that's returned from the future when it detects the switch? Once I have the detected switch (any switch from the list, really), then it's a simple matter of posting an event. This has to be simple, but Python is not my strong suit, and I'm just not grasping these futures.
As written, I never get the list of kill switches printed out. The event "outlane_eb_ready" definitely fires (confirmed in the log and the monitor window). If I move the switch lookup and the for loop up into the on_load() they print out just fine, so I'm either never getting to _await_kill_switches(), or something about it being an async def is doing something I don't understand.
Thanks again,
Kaydee