mirror of https://github.com/espruino/BangleApps
drained: load boot exceptions (e.g. dst)
parent
4d676a9e46
commit
c9f4fd7cc7
|
@ -125,3 +125,15 @@ if (Bangle.isCharging())
|
|||
Bangle.on("charging", charging => {
|
||||
if(charging) checkCharge();
|
||||
});
|
||||
|
||||
if(!keepStartup){
|
||||
const storage = require("Storage");
|
||||
for(const boot of exceptions){
|
||||
try{
|
||||
const js = storage.read(`${boot}.boot.js`);
|
||||
if(js) eval(js);
|
||||
}catch(e){
|
||||
console.log(`error loading boot exception "${boot}": ${e}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue