I have not seen this issue until recently, so it may be related to my upgrade to 6.50. Also the same app does not exhibit this issue, and runs as expected, on a friends Vivoactive, and in the simulator in Fenix 3 mode. I have seen this issue now in: Cardiometer (my app), the demo below, RHR (downloaded from app store)
I have created a trivial sample app, detailed below which demonstrates this issue. Any ideas or help are much apreciated.
Test.mc
class SensorTester extends Ui.View
{
var string_HR;
//! Constructor
function initialize()
{
Snsr.setEnabledSensors( [Snsr.SENSOR_HEARTRATE] );
Snsr.enableSensorEvents( method(:onSnsr) );
string_HR = "---bpm";
}
//! Handle the update event
function onUpdate(dc)
{
dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_BLACK);
dc.clear();
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT );
dc.drawText( 100, 90, Gfx.FONT_LARGE, string_HR, Gfx.TEXT_JUSTIFY_CENTER);
}
function onSnsr(sensor_info)
{
var HR = sensor_info.heartRate;
var bucket;
if( sensor_info.heartRate != null )
{
string_HR = HR.toString() + "bpm";
}
else
{
string_HR = "---bpm";
}
Ui.requestUpdate();
}
}
//! main is the primary start point for a Monkeybrains application
class TestApp extends App.AppBase
{
function onStart()
{
return false;
}
function getInitialView()
{
return [new SensorTester()];
}
function onStop()
{
return false;
}
}
Edit: Changed code sample to Sensor example app based code.