hrm 0.09: Grey out BPM until confidence is over 50%

master
Gordon Williams 2022-03-22 15:22:05 +00:00
parent 7d78aa6bd1
commit 9abc9296df
3 changed files with 4 additions and 4 deletions

View File

@ -6,3 +6,4 @@
0.06: Add widgets
0.07: Update scaling for new firmware
0.08: Don't force backlight on/watch unlocked on Bangle 2
0.09: Grey out BPM until confidence is over 50%

View File

@ -35,9 +35,9 @@ function onHRM(h) {
g.clearRect(0,24,g.getWidth(),80);
g.setFont("6x8").drawString("Confidence "+hrmInfo.confidence+"%", px, 75);
var str = hrmInfo.bpm;
g.setFontVector(40).drawString(str,px,45);
g.setFontVector(40).setColor(hrmInfo.confidence > 50 ? g.theme.fg : "#888").drawString(str,px,45);
px += g.stringWidth(str)/2;
g.setFont("6x8");
g.setFont("6x8").setColor(g.theme.fg);
g.drawString("BPM",px+15,45);
}
Bangle.on('HRM', onHRM);
@ -101,4 +101,3 @@ function readHRM() {
lastHrmPt = [hrmOffset, y];
}
}

View File

@ -1,7 +1,7 @@
{
"id": "hrm",
"name": "Heart Rate Monitor",
"version": "0.08",
"version": "0.09",
"description": "Measure your heart rate and see live sensor data",
"icon": "heartrate.png",
"tags": "health",