mirror of https://github.com/espruino/BangleApps
Remove temperature wear check and update wear temperature setting
parent
efae29ce35
commit
565fb15255
|
@ -13,7 +13,6 @@ global.sleeplog = {
|
|||
minConsec: 18E5, // [ms] minimal time to count for consecutive sleep
|
||||
deepTh: 100, // threshold for deep sleep
|
||||
lightTh: 200, // threshold for light sleep
|
||||
tempWearCheck: false, // use temperature to detect if worn
|
||||
wearTemp: 29, // temperature threshold to count as worn
|
||||
}, require("Storage").readJSON("sleeplog.json", true) || {})
|
||||
};
|
||||
|
@ -181,7 +180,7 @@ if (sleeplog.conf.enabled) {
|
|||
|
||||
// check wearing status either based on HRM or temperature as set in settings
|
||||
checkIsWearing: function(returnFn, data) {
|
||||
if (this.conf.tempWearCheck) {
|
||||
if (!!this.conf.wearTemp) {
|
||||
return returnFn(!Bangle.isCharging() && E.getTemperature() >= this.conf.wearTemp, data);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
minConsec: 18E5, // [ms] minimal time to count for consecutive sleep
|
||||
deepTh: 100, // threshold for deep sleep
|
||||
lightTh: 200, // threshold for light sleep
|
||||
tempWearCheck: false, // use temperature to detect if worn
|
||||
wearTemp: 29, // temperature threshold to count as worn
|
||||
// app settings
|
||||
breakToD: 12, // [h] time of day when to start/end graphs
|
||||
|
@ -350,13 +349,14 @@
|
|||
/*LANG*/"Wear Temperature": {
|
||||
value: settings.wearTemp,
|
||||
step: 0.5,
|
||||
min: 20,
|
||||
min: 19.5,
|
||||
max: 40,
|
||||
wrap: true,
|
||||
noList: true,
|
||||
format: v => v + "°C",
|
||||
format: v => v === 19.5 ? "Disabled" : v + "°C",
|
||||
onchange: v => {
|
||||
settings.wearTemp = v;
|
||||
settings.wearTemp = v === 19.5 ? null : v;
|
||||
writeSetting();
|
||||
}
|
||||
},
|
||||
|
@ -436,12 +436,6 @@
|
|||
require("sleeplog").setEnabled(v);
|
||||
}
|
||||
},
|
||||
/*LANG*/"Wear detection using temperature": {
|
||||
value: settings.tempWearCheck,
|
||||
onchange: v => {
|
||||
settings.tempWearCheck = v;
|
||||
}
|
||||
},
|
||||
/*LANG*/"Debugging": {
|
||||
value: debugImg,
|
||||
onchange: () => setTimeout(showDebug, 10)
|
||||
|
|
Loading…
Reference in New Issue