Battery percentage is not monotonic

Posted on
  • The battery level is a bit jittery.
    Which wouldn't be a problem, except that just below 30% GadgetBridge keeps sending "Gadget battery low!" notifications: the notification is dismissed when it jumps back to 30%, and then the next update below 30% triggers a fresh notification. (see attached graph)

    I think ideally the firmware would force E.getBattery() to be monotonic, i.e. remember the last value, and only update to lower values while discharging, and only update to higher values while charging?


    1 Attachment

    • Bangle.js_2_battery_graph_Screenshot_20220205-224030_Gadgetbridge.png
  • I think ideally the firmware would force E.getBattery() to be monotonic, i.e. remember the last value, and only update to lower values while discharging, and only update to higher values while charging?

    I guess we could do that... It would smooth things out a lot (or at least we could update it only if it changed by 5% or more?)

  • update it only if it changed by 5% or more?

    That's probably better, otherwise it could get stuck on a low value after any glitch.

  • @rigrig may I ask you how you got this battery info chart working on GadgetBridge ?
    @HughB might be interrested too

  • The chart is fixed with this GadgetBridge PR, which was merged a few days ago, so it should work in the next GB release.

  • Well spotted.

  • thank you !

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Battery percentage is not monotonic

Posted by Avatar for rigrig @rigrig

Actions