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.
Best Answer04-30-2018 14:13
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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
Best Answer