Closed gsalaman closed 3 years ago
...except now it's not getting any presses, even without serial. Sniffer sees the presses, but GridBoard does not.
Okay, progress. I think that the blocking issue was because of missing sleeps in the driver. I think I've got that one nailed.
But then I think the issue is that by including "get_buttons" in each sub-module, we make multple MQTT clients with the same name. By only doing one "app" (and therefore one client), life is good.
Gonna do some more testing, but I think we'll need to initialize our button handler once in the top level (like "matrix"), and then pass it down to the subsequent apps.
Okay, weird. Running it again, and now It's happy...multiple times...without passing the button presser.
Gonna check in a "checkpoint" here...
More playing...the multiple "get_buttons" doesn't seem to be the issue. I think it was a weird side effect of doing image initalizations in global space in an app...we'll need to trigger them from the class. Tweaking my way through the rest of the TTT driver...
Yup...this looks happy now. I've got it checked in on my glenn_ttt_launch branch...gonna leave this issue open until I try it on the jumbotron to be sure...
...and, tried it on the jumbotron, and all is good.
When running with both MQTT and serial buttons, the "button_client" test (just text) works fine...but button_test_blocking with images doesn't see MQTT.
Note I think this may be related to serial...when I'm playing with the launcher, disconnected from serial, I get MQTT presses just fine...