BangleApps/apps/powermanager
Gordon Williams 69e344fbc5 minor regex tweaks 2024-10-29 11:10:03 +00:00
..
ChangeLog Bump app versions 2024-03-04 22:32:06 +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 - Log timestamps while tracing and tweak table visuals 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 minor regex tweaks 2024-10-29 11:10:03 +00:00
lib.js powermanager - New option to automatically calibrate the battery 2022-11-05 10:02:03 +01:00
metadata.json Bump app versions 2024-03-04 22:32:06 +01:00
settings.js powermanager - Allow clearing log files from settings 2023-05-12 00:35:12 +02:00
widget.js Fix no-unused-vars in existing apps 2024-03-04 21:34:50 +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