mirror of https://github.com/espruino/BangleApps
sensortools - Add setting for log
parent
560e39b900
commit
d884e21a8e
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"enabled": false,
|
||||
"log": false,
|
||||
"mag": {
|
||||
"enabled": false,
|
||||
"mode": "emulate",
|
||||
|
|
|
@ -5,6 +5,7 @@ exports.enable = () => {
|
|||
);
|
||||
|
||||
let log = function(text, param) {
|
||||
if (!settings.log) return;
|
||||
let logline = new Date().toISOString() + " - " + "Sensortools - " + text;
|
||||
if (param) logline += ": " + JSON.stringify(param);
|
||||
print(logline);
|
||||
|
|
|
@ -88,6 +88,12 @@
|
|||
writeSettings("enabled",v);
|
||||
},
|
||||
},
|
||||
'Log': {
|
||||
value: !!settings.log,
|
||||
onchange: v => {
|
||||
writeSettings("log",v);
|
||||
},
|
||||
},
|
||||
'GPS': ()=>{showSubMenu("GPS","gps",["nop", "staticfix", "nofix", "changingfix", "route", "routeFuzzy"],[]);},
|
||||
'Compass': ()=>{showSubMenu("Compass","mag",["nop", "static", "rotate"],[]);},
|
||||
'HRM': ()=>{showSubMenu("HRM","hrm",["nop", "static"],["bpmtrippled"],["sin"]);}
|
||||
|
|
Loading…
Reference in New Issue