apps/chargent: fixed boot

master
notEvil 2023-07-01 10:48:43 +02:00
parent 0662bb44f5
commit b957b61ceb
3 changed files with 7 additions and 3 deletions

View File

@ -2,3 +2,4 @@
0.02: Support BangleJS2
0.03: Added threshold
0.04: Added notification
0.05: Fixed boot

View File

@ -2,7 +2,7 @@
const pin = process.env.HWVERSION === 2 ? D3 : D30;
var id;
Bangle.on('charging', (charging) => {
function gent(charging) {
if (charging) {
if (!id) {
var max = 0;
@ -37,5 +37,8 @@
require('notify').hide({id: 'chargent'});
}
}
});
}
Bangle.on('charging', gent);
if (Bangle.isCharging()) gent(true);
})();

View File

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