gkoh / furble

A bluetooth wireless remote shutter release/button for Fujifilm X/GFX and Canon EOS cameras.
https://furble-web-installer.koh.wtf
MIT License
66 stars 8 forks source link

Add bluetooth connection disconnect handling #74

Closed matthudsonau closed 6 months ago

matthudsonau commented 6 months ago

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

gkoh commented 6 months ago

@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. Specifically, if I switch off the camera (and leave it off) whilst connected, the reconnecting progress bar is either:

permanently stalled OR screen blanks It looks like it exits either remote_control() or remote_interval() and ends up stuck in menu_remote() in the runOnce()) call and doesn't redraw the screen.

Are you able to look into it?

matthudsonau commented 6 months ago

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

gkoh commented 6 months ago

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!

gkoh commented 6 months ago

LGTM, merged!