Power Management for Sensors #5113
Replies: 1 comment
-
Posted at 2022-08-15 by @gfwilliams
It's fine. If an app was using something and you change app, the sensor is powered off. Espruino waits about 1 second after the new app has loaded, and then turns off anything that's not used by the new app. The reasoning is especially for stuff like GPS that can take a while to 'warm up' it's good to leave it running between apps if we can so it's ready to use as soon as possible.
Yep, Posted at 2022-08-17 by fanoushs-punching-bag What about battery low options? Like below 10 percent, override any sensors to off? Posted at 2022-08-18 by @gfwilliams You could create an app which will do that if you want? Posted at 2022-08-18 by Hank Remembering the Pebble as a reference: It shut down all features and just displayed the time with a minimal watchface when battery got under a certain threshold. Posted at 2022-08-18 by @gfwilliams I guess I just wonder, as long as you're using a simple watchface and you have GPS off, your battery life should be multiple weeks anyway. At what point is it actually going to be useful to prolong that, and isn't going to be really annoying if your watch refuses to do what you want when you want it to? Posted at 2022-08-18 by Hank Good point, maybe we all are just used to those devices that care sh*t about power management :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-08-13 by GRikell
Hello All,
I need some clarifications about what is the proper way of managing power of the various sensors (compass, barometer, ..).
From the Espruino reference, I gather that there is a set of Bangle.setXYZPower() functions, which turn on or off the sensors, but I wonder what happens if an application is terminated or replaced, while a sensor is powered on.
Does the sensor remains up, or is it everything reset each time a new app is loaded?
Perhaps the firmware maintains a list of apps which are using the sensor, and remove the relative entry when an app exits?
Any kind of atExit() callback, in order to clean up things properly before terminating?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions