Stop users calling save() (fix #125)
If Debug info is set to 'show' don't move to Terminal if connected!master
parent
6c7c9c2bc1
commit
d07dc1de6f
|
|
@ -2,7 +2,7 @@
|
|||
{ "id": "boot",
|
||||
"name": "Bootloader",
|
||||
"icon": "bootloader.png",
|
||||
"version":"0.09",
|
||||
"version":"0.10",
|
||||
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||
"tags": "tool,system",
|
||||
"type":"bootloader",
|
||||
|
|
|
|||
|
|
@ -6,3 +6,5 @@
|
|||
0.07: Fix issues with alarm scheduling
|
||||
0.08: Fix issues if BLE=off, 'Make Connectable' is chosen, and the loader resets Bangle.js (fix #108)
|
||||
0.09: Only check GPS for time after a fresh boot
|
||||
0.10: Stop users calling save() (fix #125)
|
||||
If Debug info is set to 'show' don't move to Terminal if connected!
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ if (s.blerepl===false) { // If not programmable, force terminal off Bluetooth
|
|||
if (s.log) Terminal.setConsole(true); // if showing debug, force REPL onto terminal
|
||||
else E.setConsole(null,{force:true}); // on new (2v05+) firmware we have E.setConsole which allows a 'null' console
|
||||
} else {
|
||||
if (s.log) Terminal.setConsole(); // if showing debug, put REPL on terminal (until connection)
|
||||
if (s.log && !NRF.getSecurityStatus().connected) Terminal.setConsole(); // if showing debug, put REPL on terminal (until connection)
|
||||
else Bluetooth.setConsole(true); // else if no debug, force REPL to Bluetooth
|
||||
}
|
||||
// we just reset, so BLE should be on.
|
||||
|
|
@ -25,6 +25,8 @@ Bangle.setLCDTimeout(s.timeout);
|
|||
if (!s.timeout) Bangle.setLCDPower(1);
|
||||
E.setTimeZone(s.timezone);
|
||||
delete s;
|
||||
// stop users doing bad things!
|
||||
global.save = function() { throw new Error("You can't use save() on Bangle.js without overwriting the bootloader!"); }
|
||||
// check for alarms
|
||||
var alarms = require('Storage').readJSON('alarm.json',1)||[];
|
||||
var time = new Date();
|
||||
|
|
|
|||
Loading…
Reference in New Issue