mirror of https://github.com/espruino/BangleApps
bikespeedo: option to stop recording on app exit
parent
425df4a3db
commit
ca03a82535
|
@ -568,6 +568,9 @@ if (cfg.record && WIDGETS["recorder"]) {
|
||||||
WIDGETS["recorder"]
|
WIDGETS["recorder"]
|
||||||
.setRecording(true)
|
.setRecording(true)
|
||||||
.then(start);
|
.then(start);
|
||||||
|
|
||||||
|
if (cfg.recordStopOnExit)
|
||||||
|
E.on('kill', () => WIDGETS["recorder"].setRecording(false));
|
||||||
} else {
|
} else {
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (global.WIDGETS && WIDGETS["recorder"])
|
if (global.WIDGETS && WIDGETS["recorder"]) {
|
||||||
appMenu[/*LANG*/"Record rides"] = {
|
appMenu[/*LANG*/"Record rides"] = {
|
||||||
value : !!settings.record,
|
value : !!settings.record,
|
||||||
onchange : v => {
|
onchange : v => {
|
||||||
|
@ -30,6 +30,14 @@
|
||||||
writeSettings();
|
writeSettings();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
appMenu[/*LANG*/"Stop record on exit"] = {
|
||||||
|
value : !!settings.recordStopOnExit,
|
||||||
|
onchange : v => {
|
||||||
|
settings.recordStopOnExit = v;
|
||||||
|
writeSettings();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const altdiffMenu = {
|
const altdiffMenu = {
|
||||||
'': { 'title': 'Altitude adjustment' },
|
'': { 'title': 'Altitude adjustment' },
|
||||||
|
|
Loading…
Reference in New Issue