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!
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.
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!