chargent: allow a tap on the notification to silence it

pull/3262/head
Rob Pilling 2024-03-16 08:39:47 +00:00
parent 5173e1c578
commit 1cb2586a7b
4 changed files with 7 additions and 3 deletions

View File

@ -3,3 +3,4 @@
0.03: Added threshold
0.04: Added notification
0.05: Fixed boot
0.06: Allow tap to silence notification/buzzing

View File

@ -6,10 +6,12 @@ The first stage of charging Li-ion ends at ~80% capacity when the charge voltage
This app has no UI and no configuration. To disable the app, you have to uninstall it.
Tap the charged notification to prevent buzzing for this charging session.
New in v0.03: before the very first buzz, the average value after the peak is written to chargent.json and used as threshold for future charges. This reduces the time spent in the second charge stage.
Side notes
- Full capacity is reached after charge current drops to an insignificant level. This is quite some time after charge voltage reached its peak / `E.getBattery()` returns 100.
- This app starts buzzing some time after `E.getBattery()` returns 100 (~15min on my watch), and at least 5min after the peak to account for noise.
\* according to https://batteryuniversity.com/article/bu-409-charging-lithium-ion assuming similar characteristics and readouts from pin `D30` approximate charge voltage
\* according to https://batteryuniversity.com/article/bu-409-charging-lithium-ion assuming similar characteristics and readouts from pin `D30` approximate charge voltage

View File

@ -24,7 +24,8 @@
lim = sum / cnt;
require('Storage').writeJSON('chargent.json', {limit: lim});
}
require('notify').show({id: 'chargent', title: 'Fully charged'});
const onHide = () => { id = clearInterval(id) };
require('notify').show({id: 'chargent', title: 'Fully charged', onHide });
// TODO ? customizable
Bangle.buzz(500);
setTimeout(() => Bangle.buzz(500), 1000);

View File

@ -1,6 +1,6 @@
{ "id": "chargent",
"name": "Charge Gently",
"version": "0.05",
"version": "0.06",
"description": "When charging, reminds you to disconnect the watch to prolong battery life.",
"icon": "icon.png",
"type": "bootloader",