My gpsservice now has a settings.json file in which I store "service": true/false.
Most of the settings examples call the reload() function on the widget but really all I want to do is save the values.
I notice that when you exit the settings App this causes the widget to be restarted.
I dont think its a good idea to call reload() inside the draw() function.
Is there a way to call reload() when the widget is restarted such that it determine its state and what to do ?
Also I would ideally want to call the Bangle object to determine if GPS is on or not, rather than try and track it through variables in the widget.
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.
My gpsservice now has a settings.json file in which I store "service": true/false.
Most of the settings examples call the reload() function on the widget but really all I want to do is save the values.
I notice that when you exit the settings App this causes the widget to be restarted.
I dont think its a good idea to call reload() inside the draw() function.
Is there a way to call reload() when the widget is restarted such that it determine its state and what to do ?
Also I would ideally want to call the Bangle object to determine if GPS is on or not, rather than try and track it through variables in the widget.