Skip to content

Commit

Permalink
Merge pull request #2853 from notEvil/chargent5
Browse files Browse the repository at this point in the history
chargent: fixed boot
  • Loading branch information
gfwilliams committed Jul 3, 2023
2 parents eb8859a + b957b61 commit 0db2560
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/chargent/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
0.02: Support BangleJS2
0.03: Added threshold
0.04: Added notification
0.05: Fixed boot
7 changes: 5 additions & 2 deletions apps/chargent/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -37,5 +37,8 @@
require('notify').hide({id: 'chargent'});
}
}
});
}

Bangle.on('charging', gent);
if (Bangle.isCharging()) gent(true);
})();
2 changes: 1 addition & 1 deletion apps/chargent/metadata.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 0db2560

Please sign in to comment.