1) If you reboot (long BTN1 reset) then Bangle.getHealthStatus("day").steps resets to 0
Yes, that's expected. I feel like the amount of times someone will hard-reboot their watch should be basically zero in normal usage though?
Potentially later this could be improved though (eg scraping the recorded health data on first boot)
2) Noticing throughout the day that Bangle.getHealthStatus("day").steps is a 10, 20, 30 steps ahead of widpedom
Well, this probably shows its working better. There are cases (eg if you hard-reboot by long-pressing the button) where widpedom can't store the latest step count
What are the factors that mean a font comes out low in bytes - is this just trial and error ?
Its entirely related to width * height * characters.
If you define the font inside the rendering function, the font will stay in flash memory though so it's less of a big deal
4) @ Gordon - is calling Bangle.drawWidgets() - safe in the draw function ? I copied it from widpedom.
It's not great - it's going to cause it to recurse. widpedom really shouldn't be doing that. You could do: setTimeout(() => Bangle.drawWidgets(), 10);return to force it to redraw once everything else is done I guess.
Is it better to use setInterval(...) or Bangle.on('step',) to trigger redraws
I'd say to redraw on 'step' - after all, that's when you know something has changed. You can always check Bangle.isLCDOn to skip a redraw
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.
Yes, that's expected. I feel like the amount of times someone will hard-reboot their watch should be basically zero in normal usage though?
Potentially later this could be improved though (eg scraping the recorded health data on first boot)
Well, this probably shows its working better. There are cases (eg if you hard-reboot by long-pressing the button) where widpedom can't store the latest step count
Its entirely related to width * height * characters.
If you define the font inside the rendering function, the font will stay in flash memory though so it's less of a big deal
It's not great - it's going to cause it to recurse.
widpedom
really shouldn't be doing that. You could do:setTimeout(() => Bangle.drawWidgets(), 10);return
to force it to redraw once everything else is done I guess.I'd say to redraw on 'step' - after all, that's when you know something has changed. You can always check
Bangle.isLCDOn
to skip a redraw