I'm trying to use the simulator to generate fake data for the Heart Rate sensor. The problem is that sensorInfo is still null. Also i would like to know where the .FIT file is generated.
Here is my code:
function onShow() {
Sensor.setEnabledSensors( [Sensor.SENSOR_HEARTRATE] );
Sensor.enableSensorEvents( method(nSensor) );
}
function onSensor(sensorInfo)
{
if (!sensorInfo){
System.println("No data");
}else{
if (currentValue != sensorInfo.heartRate){
currentValue = sensorInfo.heartRate;
}
}
WatchUi.requestUpdate();
}
Thanks you!