Under Review
over 1 year ago

The heart rate history iterator never returns valid data on the Venu2

Here are some parts of the code that I'm using.

it = SensorHistory.getHeartRateHistory({:period => 30, :order => SensorHistory.ORDER_OLDEST_FIRST});
var min = it.getMin();
var max = it.getMax();
var sample_last = it.next();
if(null == min ||
   null == max)
{
    //Error
    return;
}

var sample = it.next();
if(null == sample ||
   null == sample.data ||
   null == sample.when)
{
    //Error
    return; 
}

The code works fine for all watch models in the simulator. It works fine on my other watches as well. Vivoactive3, Fenix5 and Fenix6XPro.

On the Venu2 min, max and sample are always NULL.

The other history iterators like elevation, pressure and temperature work without problems on the Venu2.