That seems to be a valid compromise. We could just switch on the first Gadgetbridge GPS event, keep time until the next arrive to get the configured timeout and then set a timeout slightly longer to re-enable builtin GPS. That way no handling of connection events would be necessary and no internal keeping of state besides the expected time to next Gadgetbridge GPS event. Maybe even communicate the configured interval duration in the first or all GPS events to make this easier to do on the bangle.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
That seems to be a valid compromise. We could just switch on the first Gadgetbridge GPS event, keep time until the next arrive to get the configured timeout and then set a timeout slightly longer to re-enable builtin GPS. That way no handling of connection events would be necessary and no internal keeping of state besides the expected time to next Gadgetbridge GPS event. Maybe even communicate the configured interval duration in the first or all GPS events to make this easier to do on the bangle.