Ticket Created
over 3 years ago

CIQQA-496

Venu SQ error on getOxygenSaturationHistory

Hi, Im using this code to retrieve and use oxygen saturation history, it works on all devices except Venu SQ, why????

if ((Toybox has :SensorHistory) && (Toybox.SensorHistory has :getOxygenSaturationHistory)) {
sample = SensorHistory.getOxygenSaturationHistory({ :period => 1, :order => SensorHistory.ORDER_NEWEST_FIRST })
.next();
if ((sample != null) && (sample.data != null)) {
values[:current] = sample.data.toNumber();

}
}else{
values[:current]="N.A";
}

This is the trace in simulator and the problem is in this line:

sample = SensorHistory.getOxygenSaturationHistory({ :period => 1, :order => SensorHistory.ORDER_NEWEST_FIRST }).next();

Error: Invalid Value
Details: Failed invoking <symbol>
Stack:
- getValuesForType() at G:\tooNew\NewTooSimply\source\NewTooSimplyView.mc:2074 0x10005dd0
- pintarProgresoDato() at G:\tooNew\NewTooSimply\source\NewTooSimplyView.mc:439 0x100023b9
- onUpdate() at G:\tooNew\NewTooSimply\source\NewTooSimplyView.mc:243 0x10001b4f

Thanks.

Parents Comment Children
No Data