I have experienced the bug while calling Puck.getBatteryPercentage() and NRF.getBattery() in firmware v2.07, the values were 0 and -3.6, respectively. It is OK while I downgrade to v2.06. These wrong values existed only if I send my code (for my own server and service) to RAM (using Web IDE). I've tested two Puck.js devices I have. Just report the issue for the reference. Thank you all my lovely Espruino team.
I just booted up a fresh 2v07 Puck.js and uploaded:
print(E.getBattery(), NRF.getBattery(), Puck.getBatteryPercentage());
via the Web IDE, to RAM, and I get:
100 2.84765625 100
// or if I turn LED1 on first to stress the battery
79 2.68242187500 79
So at least in a basic way it seems to be working. However it seems if I do analogRead(D2) first then I can break it even until a hard reboot...
I'll get a fix in for this now - I'm planning a 2v08 release this week so hopefully it'll be in that
Ok, cutting edge builds should now have a fix for this in, and it'll be in 2v08
Always nice to hear from you. :)
I've downloaded 2v07.33 and upgraded to my Puck. The bug has been eliminated.
Thank you for your fix quickly.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem