Merge pull request #1339 from myxor/circlesclock_v0.07

Circlesclock 0.07
pull/1340/head^2
Gordon Williams 2022-01-24 13:33:52 +00:00 committed by GitHub
commit 550eae9aec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 4 deletions

View File

@ -11,3 +11,4 @@
Support to choose between humidity and wind speed for weather circle progress
Support to show time and progress until next sunrise or sunset
Load daily steps from Bangle health if available
0.07: Allow configuration of minimal heart rate confidence

View File

@ -29,6 +29,7 @@ function loadSettings() {
settings = storage.readJSON("circlesclock.json", 1) || {
'minHR': 40,
'maxHR': 200,
'confidence': 0,
'stepGoal': 10000,
'stepDistanceGoal': 8000,
'stepLength': 0.8,
@ -599,10 +600,12 @@ Bangle.on('lock', function(isLocked) {
Bangle.on('HRM', function(hrm) {
if (isCircleEnabled("hr")) {
if (hrm.confidence >= (settings.confidence || 0)) {
hrtValue = hrm.bpm;
if (Bangle.isLCDOn())
drawHeartRate();
}
}
});

View File

@ -1,7 +1,7 @@
{ "id": "circlesclock",
"name": "Circles clock",
"shortName":"Circles clock",
"version":"0.06",
"version":"0.07",
"description": "A clock with circles for different data at the bottom in a probably familiar style",
"icon": "app.png",
"screenshots": [{"url":"screenshot-dark.png"}, {"url":"screenshot-light.png"}],

View File

@ -35,6 +35,16 @@
},
onchange: x => save('maxHR', x),
},
'hr confidence': {
value: "confidence" in settings ? settings.confidence : 0,
min: 0,
max : 100,
step: 10,
format: x => {
return x;
},
onchange: x => save('confidence', x),
},
'step goal': {
value: "stepGoal" in settings ? settings.stepGoal : 10000,
min: 2000,