The idea is you mention your app/widget/code's name when you call setGPSPower - then Bangle.js keeps track and only turns the GPS off when no more apps need it.
If you change apps (and fast load is off) then all that is lost and GPS is turned off automatically (if nothing in the new app says it needs GPS within 0.5s).
How uptodate are the comments on functions like "setGPSPower"?
Should be very up to date as they are produced from the code, but it's a big project and sometimes comments don't always get updated like they should
I had assumed that once you exit an app to the main menu everything is reset to how it was before you opened the app.
As above, yes, it is (unless you set your app up to support 'fast load' in which case it should actively turn stuff off on exit). But realistically you should forget about that for now - fast load only really makes sense for clock apps.
The comments kinda hint that multiple apps could be open at the same time. In what scenario would this happen? Widget?
Yes, exactly. Widgets, boot code, etc. The term app is a bit confusing there - it's basically any code that can be running
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.
The idea is you mention your app/widget/code's name when you call setGPSPower - then Bangle.js keeps track and only turns the GPS off when no more apps need it.
If you change apps (and fast load is off) then all that is lost and GPS is turned off automatically (if nothing in the new app says it needs GPS within 0.5s).
Should be very up to date as they are produced from the code, but it's a big project and sometimes comments don't always get updated like they should
As above, yes, it is (unless you set your app up to support 'fast load' in which case it should actively turn stuff off on exit). But realistically you should forget about that for now - fast load only really makes sense for clock apps.
Yes, exactly. Widgets, boot code, etc. The term
app
is a bit confusing there - it's basically any code that can be running