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