All values obtained with getOxygenSaturation will be null.
They are obtained after sensor assignment
The following is the actual code
Sensor.setEnabledSensors([Sensor.SENSOR_PULSE_OXIMETRY]);
if ((Toybox has :SensorHistory) && (Toybox.SensorHistory has :getOxygenSaturationHistory)) {
var itr = Toybox.SensorHistory.getOxygenSaturationHistory({:period=>1});
if(itr == null){
ml.debug("no result oxygen");
return 100;
}else{
var result = itr.next();
ml.debug("result oxygen" + result);
return result.data;
}
}
ml.debug is a homebrew logger, so it is irrelevant
ciq version 4