Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detect HRM Inactivity?

ANSWERED

I am able to grab values from from the HRM with no issue, but now I am looking to reset my displayed value to "--" if the HRM stops picking up new values. Is there a best practice way of doing this?

 

The only way I can think of doing it is by setting a global variable that increments after every second, and if it reaches >5, set the value to "--", but if the heart rate updates, set it to 0 while updating the on screen heart rate.

 

Any other suggestions?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Each sensor reading has a timestamp, I would check the age of the timestamp and use that to determine how stale the reading is.

 

https://dev.fitbit.com/build/reference/device-api/sensors/#sensorreading

View best answer in original post

Best Answer
1 REPLY 1

Each sensor reading has a timestamp, I would check the age of the timestamp and use that to determine how stale the reading is.

 

https://dev.fitbit.com/build/reference/device-api/sensors/#sensorreading

Best Answer