chargent: allow a tap on the notification to silence it

master
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.03: Added threshold
0.04: Added notification 0.04: Added notification
0.05: Fixed boot 0.05: Fixed boot
0.06: Allow tap to silence notification/buzzing

View File

@ -6,6 +6,8 @@ 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. 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. 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 Side notes

View File

@ -24,7 +24,8 @@
lim = sum / cnt; lim = sum / cnt;
require('Storage').writeJSON('chargent.json', {limit: lim}); 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 // TODO ? customizable
Bangle.buzz(500); Bangle.buzz(500);
setTimeout(() => Bangle.buzz(500), 1000); setTimeout(() => Bangle.buzz(500), 1000);

View File

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