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",
|
{ "id": "boot",
|
||||||
"name": "Bootloader",
|
"name": "Bootloader",
|
||||||
"icon": "bootloader.png",
|
"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",
|
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||||
"tags": "tool,system",
|
"tags": "tool,system",
|
||||||
"type":"bootloader",
|
"type":"bootloader",
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,5 @@
|
||||||
0.07: Fix issues with alarm scheduling
|
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.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.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
|
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 E.setConsole(null,{force:true}); // on new (2v05+) firmware we have E.setConsole which allows a 'null' console
|
||||||
} else {
|
} 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
|
else Bluetooth.setConsole(true); // else if no debug, force REPL to Bluetooth
|
||||||
}
|
}
|
||||||
// we just reset, so BLE should be on.
|
// we just reset, so BLE should be on.
|
||||||
|
|
@ -25,6 +25,8 @@ Bangle.setLCDTimeout(s.timeout);
|
||||||
if (!s.timeout) Bangle.setLCDPower(1);
|
if (!s.timeout) Bangle.setLCDPower(1);
|
||||||
E.setTimeZone(s.timezone);
|
E.setTimeZone(s.timezone);
|
||||||
delete s;
|
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
|
// check for alarms
|
||||||
var alarms = require('Storage').readJSON('alarm.json',1)||[];
|
var alarms = require('Storage').readJSON('alarm.json',1)||[];
|
||||||
var time = new Date();
|
var time = new Date();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue