bikespeedo: option to stop recording on app exit

pull/2733/head
Rob Pilling 2023-05-08 10:49:33 +01:00
parent 425df4a3db
commit ca03a82535
2 changed files with 12 additions and 1 deletions

View File

@ -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();
}

View File

@ -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' },