forked from FOSS/BangleApps
0.30: Remove 'Get GPS time' at boot. Latest firmwares keep time through reboots, so this is not needed now
parent
c96ae6c8ae
commit
4fd4d692e5
|
@ -4,7 +4,7 @@
|
||||||
"tags": "tool,system,b2",
|
"tags": "tool,system,b2",
|
||||||
"type":"bootloader",
|
"type":"bootloader",
|
||||||
"icon": "bootloader.png",
|
"icon": "bootloader.png",
|
||||||
"version":"0.29",
|
"version":"0.30",
|
||||||
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":".boot0","url":"boot0.js"},
|
{"name":".boot0","url":"boot0.js"},
|
||||||
|
|
|
@ -29,3 +29,4 @@
|
||||||
0.28: Fix double clock load after settings are changed
|
0.28: Fix double clock load after settings are changed
|
||||||
0.29: Update boot0 to avoid code block (faster execution)
|
0.29: Update boot0 to avoid code block (faster execution)
|
||||||
Fix issues where 'Uncaught Error: Function not found' could happen with multiple .boot.js
|
Fix issues where 'Uncaught Error: Function not found' could happen with multiple .boot.js
|
||||||
|
0.30: Remove 'Get GPS time' at boot. Latest firmwares keep time through reboots, so this is not needed now
|
||||||
|
|
|
@ -15,25 +15,5 @@ if (!clockApp) {
|
||||||
clockApp = require("Storage").read(clockApp.src);
|
clockApp = require("Storage").read(clockApp.src);
|
||||||
}
|
}
|
||||||
if (!clockApp) clockApp=`E.showMessage("No Clock Found");setWatch(()=>{Bangle.showLauncher();}, BTN2, {repeat:false,edge:"falling"});`;
|
if (!clockApp) clockApp=`E.showMessage("No Clock Found");setWatch(()=>{Bangle.showLauncher();}, BTN2, {repeat:false,edge:"falling"});`;
|
||||||
// check to see if our clock is wrong - if it is use GPS time
|
|
||||||
if ((new Date()).getFullYear()<2000) {
|
|
||||||
E.showMessage("Searching for\nGPS time");
|
|
||||||
Bangle.on("GPS",function cb(g) {
|
|
||||||
Bangle.setGPSPower(0);
|
|
||||||
Bangle.removeListener("GPS",cb);
|
|
||||||
if (!g.time || (g.time.getFullYear()<2000) ||
|
|
||||||
(g.time.getFullYear()>2200)) {
|
|
||||||
// GPS receiver's time not set - just boot clock anyway
|
|
||||||
eval(clockApp);
|
eval(clockApp);
|
||||||
delete clockApp;
|
delete clockApp;
|
||||||
return;
|
|
||||||
}
|
|
||||||
// We have a GPS time. Set time and reboot (to load alarms properly)
|
|
||||||
setTime(g.time.getTime()/1000);
|
|
||||||
load();
|
|
||||||
});
|
|
||||||
Bangle.setGPSPower(1);
|
|
||||||
} else {
|
|
||||||
eval(clockApp);
|
|
||||||
delete clockApp;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue