diff --git a/apps.json b/apps.json index 20ccccc07..dbbe95edb 100644 --- a/apps.json +++ b/apps.json @@ -683,7 +683,7 @@ { "id": "hrm", "name": "Heart Rate Monitor", "icon": "heartrate.png", - "version":"0.04", + "version":"0.05", "description": "Measure your heart rate and see live sensor data", "tags": "health", "storage": [ diff --git a/apps/hrm/ChangeLog b/apps/hrm/ChangeLog index 6cedf8f1b..d27886b15 100644 --- a/apps/hrm/ChangeLog +++ b/apps/hrm/ChangeLog @@ -2,3 +2,4 @@ 0.02: Use HRM data and calculations from Bangle.js (don't access hardware directly) 0.03: Fix timing issues, and use 1/2 scale to keep graph on screen 0.04: Update for new firmwares that have a 'HRM-raw' event +0.05: Tweaks for 'HRM-raw' handling diff --git a/apps/hrm/heartrate.js b/apps/hrm/heartrate.js index 09e8a826e..9bc708ee8 100644 --- a/apps/hrm/heartrate.js +++ b/apps/hrm/heartrate.js @@ -46,9 +46,12 @@ Bangle.on('HRM-raw', function(v) { g.moveTo(-100,0); } - y = E.clip(170 - (v.raw*2),100,230); - g.setColor(1,1,1); - g.lineTo(hrmOffset, y); + y = E.clip(170 - (v.raw),100,230); + g.setColor(g.theme.fg).lineTo(hrmOffset, y); + if (counter !==undefined) { + counter = undefined; + g.clear(); + } }); // It takes 5 secs for us to get the first HRM event @@ -80,7 +83,6 @@ function readHRM() { var a = hrmInfo.raw[hrmOffset]; hrmOffset++; y = E.clip(170 - (a*2),100,230); - g.setColor(1,1,1); - g.lineTo(hrmOffset, y); + g.setColor(g.theme.fg).lineTo(hrmOffset, y); } }