forked from FOSS/BangleApps
commit
fb694036a4
|
@ -1,3 +1,4 @@
|
|||
0.01: First version
|
||||
0.02: Support BangleJS2
|
||||
0.03: Added threshold
|
||||
0.04: Added notification
|
||||
|
|
|
@ -24,16 +24,17 @@
|
|||
lim = sum / cnt;
|
||||
require('Storage').writeJSON('chargent.json', {limit: lim});
|
||||
}
|
||||
require('notify').show({id: 'chargent', title: 'Fully charged'});
|
||||
// TODO ? customizable
|
||||
Bangle.buzz(500);
|
||||
setTimeout(() => Bangle.buzz(500), 1000);
|
||||
}
|
||||
}, 30*1000);
|
||||
}, 3e4);
|
||||
}
|
||||
} else {
|
||||
if (id) {
|
||||
clearInterval(id);
|
||||
id = undefined;
|
||||
id = clearInterval(id);
|
||||
require('notify').hide({id: 'chargent'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{ "id": "chargent",
|
||||
"name": "Charge Gently",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "When charging, reminds you to disconnect the watch to prolong battery life.",
|
||||
"icon": "icon.png",
|
||||
"type": "bootloader",
|
||||
"tags": "battery",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"dependencies": {"notify": "type"},
|
||||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name": "chargent.boot.js", "url": "boot.js"}
|
||||
|
|
Loading…
Reference in New Issue