-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bluetooth connection disconnect handling #74
Add bluetooth connection disconnect handling #74
Conversation
This allows the event function to have context on call and avoid requiring global variables to maintain state.
@matthudsonau OK, I've refactored the context blahs to completely remove the global variables. I'll be using this in a future refactor to try and make the UI code less messy. In testing I found the reconnection to work well, good job! However, if the reconnection fails, bad things happen. permanently stalled OR Are you able to look into it? |
Yeah, I'll have a run at it tonight. Although the easiest way to fix it is probably just resetting the program if the connection doesn't restore |
This absolutely the right answer and have implemented it, thanks! |
LGTM, merged! |
Monitors the Bluetooth connection status for the device and attempts an automatic reconnect whenever the connection drops
Some changes requires to M5ez to add functionality to get the current buttons
Device class is also updated to support querying connection status