I have been wrestling with my app mysteriously hanging, requiring a long press of BTNs 1 and 2, and believe I have tracked the problem down to Bangle.drawWidgets. It happens randomly and I have only ever seen it happen when both GPS and HRM power are enabled. The widgets I currently have loaded are Bluetooth Widget, Battery Level Widget (with percentage) and RAM Widget. The following code demonstrates the problem:
When it hangs, which can take anywhere up to an hour, the count is always a multiple of 10 (e.g. 16140 in my final test just now) - hence my assertion that drawWidgets is triggering the problem - and the only widget remaining visible is the bluetooth symbol. The app hangs on both the current stable firmware and bleeding edge. Nothing is logged on the console and memory usage (when running test code above) was stable at 22%.
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.
I have been wrestling with my app mysteriously hanging, requiring a long press of BTNs 1 and 2, and believe I have tracked the problem down to Bangle.drawWidgets. It happens randomly and I have only ever seen it happen when both GPS and HRM power are enabled. The widgets I currently have loaded are Bluetooth Widget, Battery Level Widget (with percentage) and RAM Widget. The following code demonstrates the problem:
When it hangs, which can take anywhere up to an hour, the count is always a multiple of 10 (e.g. 16140 in my final test just now) - hence my assertion that drawWidgets is triggering the problem - and the only widget remaining visible is the bluetooth symbol. The app hangs on both the current stable firmware and bleeding edge. Nothing is logged on the console and memory usage (when running test code above) was stable at 22%.