I'm currently trying to retrieve the max/min HR for the last 24 hrs. I used this forum and the CIQ documentation to write the following:
function findMaxMinHR( dc ) {
var hrMaxValue = 0;
var hrMinValue = 255;
if( ActivityMonitor has :HeartRateIterator ) {
var oneDay = new Time.Duration(86400);
var sensorIter = ActivityMonitor.getHeartRateHistory( oneDay, true );
if( sensorIter != null ) {
hrMinValue = sensorIter.getMin();
hrMaxValue = sensorIter.getMax();
...
I'm currently testing this on a Fenix 5x plus and the results are not the same as the ones that can be found in the connect iq iphone app. Both Min and Max are lower? Also, after removing the watch for a few hours to sleep, both values were set to 255 ( yes, 255 -> invalid). I was expecting that I would be seeing at least the max value from the night before (from a run).
Am I doing it wrong or just missing something?
Any pointers would be appreciated.