BangleApps/apps/powermanager
Martin Boonk c32f234e95 powermanager - Use charging state on boot 2023-05-12 00:35:12 +02:00
..
ChangeLog Fix d888b80ea - correctly bump ratchet launcher's version 2023-05-06 12:27:21 +01:00
README.md powermanager - Adds some todos to readme 2023-02-26 22:19:57 +01:00
app.png New power management app for setting a charging alarm and voltage offset 2022-03-08 20:38:27 +01:00
boot.js powermanager - Use charging state on boot 2023-05-12 00:35:12 +02:00
default.json powermanager - Allow recording timeouts and power changes for later analysis 2023-02-05 21:09:16 +01:00
interface.html powermanager: format seconds into days/hours/minutes/seconds 2023-04-19 12:04:15 +01:00
lib.js powermanager - New option to automatically calibrate the battery 2022-11-05 10:02:03 +01:00
metadata.json Ratchet launch: bump version 2023-05-03 22:03:07 +01:00
settings.js Convert Yes/No On/Off in settings to checkboxes, add /*LANG*/ to some more text strings 2023-02-23 11:46:49 +00:00
widget.js powermanager - Fix drawing on hidden widgets when LCD brightness is changed 2023-02-25 13:14:00 +01:00

README.md

Power manager

Manages settings for charging. Features:

  • Warning threshold to be able to disconnect the charger at a given percentage
  • Set the battery calibration offset
  • Force monotonic battery percentage or voltage
  • Automatic calibration on charging uninterrupted longer than 3 hours (reloads of the watch reset the timer).

Widget

The widget shows an approximate current power use. There is a power gauge showing the estimation of the currently used power and the currently active sensor with the biggest power draw. G for GPS, H for pulse sensor and C for compass.

Logging

You can switch on logging in the options to diagnose unexpected power use. Currently the logging can capture the code running from timeouts and intervals and the power up and down of some devices. The captured times are probably not perfect but should be good enough to indicate problems.

Do not use trace logging for extended time, it uses a lot of storage and can fill up the flash quite quick.

TODO

  • Wrap functions given as strings to setTimeout/setInterval
  • Handle eval in setTimeout/setInterval
  • Track functions executed as event handlers
  • Track buzzer
  • Modify browser interface to estimate power use like widget does

Internals

Battery calibration offset is set by writing batFullVoltage in setting.json

TODO

  • Optionally keep battery history and show as graph
  • Capture some more stuff in logging
  • Event driven code execution
  • Buzzer
  • Better tracking of display on time

Creator

halemmerich