04-30-2018 11:47 - edited 04-30-2018 11:51
04-30-2018 11:47 - edited 04-30-2018 11:51
Hi community,
I develop my first clock face and I have my first problem: I display the heart rate on my clockface, but when I take off my watch, the api return the same last value indefinitely.
My code :
let hrm = new HeartRateSensor();
hrm.start();
function updateClock(evt) {
hrLabel.text = hrm.heartRate != null ? hrm.heartRate : "--";
}
clock.ontick = function(evt) {
updateClock(evt);
}
Any solution for that ?
Answered! Go to the Best Answer.
04-30-2018 14:13
04-30-2018 14:13
You can use the timestamp to check the age of the last reading.
You can see an example here: https://github.com/Fitbit/sdk-moment/blob/master/app/simple/hrm.js
04-30-2018 14:13
04-30-2018 14:13
You can use the timestamp to check the age of the last reading.
You can see an example here: https://github.com/Fitbit/sdk-moment/blob/master/app/simple/hrm.js
05-01-2018 01:31
05-01-2018 01:31
Thanks, this repos helps me for a lot of things