Merge pull request #2853 from notEvil/chargent5

chargent: fixed boot
pull/2861/head
Gordon Williams 2023-07-03 09:10:26 +01:00 committed by GitHub
commit 0db2560cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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",