mirror of https://github.com/espruino/BangleApps
drained: always check charge, regardless of boot-disable
parent
2f084b4c8a
commit
16202c1843
|
@ -112,7 +112,6 @@ function drainedRestore() { // "public", to allow users to call
|
||||||
load(); // necessary after updating boot.0
|
load(); // necessary after updating boot.0
|
||||||
}
|
}
|
||||||
|
|
||||||
if(disableBoot){
|
|
||||||
const checkCharge = () => {
|
const checkCharge = () => {
|
||||||
if(E.getBattery() < restore) return;
|
if(E.getBattery() < restore) return;
|
||||||
drainedRestore();
|
drainedRestore();
|
||||||
|
@ -124,4 +123,3 @@ if(disableBoot){
|
||||||
Bangle.on("charging", charging => {
|
Bangle.on("charging", charging => {
|
||||||
if(charging) checkCharge();
|
if(charging) checkCharge();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue