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"]
|
||||
.setRecording(true)
|
||||
.then(start);
|
||||
|
||||
if (cfg.recordStopOnExit)
|
||||
E.on('kill', () => WIDGETS["recorder"].setRecording(false));
|
||||
} else {
|
||||
start();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
},
|
||||
};
|
||||
|
||||
if (global.WIDGETS && WIDGETS["recorder"])
|
||||
if (global.WIDGETS && WIDGETS["recorder"]) {
|
||||
appMenu[/*LANG*/"Record rides"] = {
|
||||
value : !!settings.record,
|
||||
onchange : v => {
|
||||
|
@ -30,6 +30,14 @@
|
|||
writeSettings();
|
||||
}
|
||||
};
|
||||
appMenu[/*LANG*/"Stop record on exit"] = {
|
||||
value : !!settings.recordStopOnExit,
|
||||
onchange : v => {
|
||||
settings.recordStopOnExit = v;
|
||||
writeSettings();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const altdiffMenu = {
|
||||
'': { 'title': 'Altitude adjustment' },
|
||||
|
|
Loading…
Reference in New Issue