How can I read Oxygen SpO2 level from Fenix 5X Plus using ConnectIQ?
Right now we can read Heart rate and Accelerometer data using ConnectIQ, but I see no way to read Oxygen level.
Is it possible to add Oxygen SpO2 level reading to ConnectIQ SDK?
How can I read Oxygen SpO2 level from Fenix 5X Plus using ConnectIQ?
Right now we can read Heart rate and Accelerometer data using ConnectIQ, but I see no way to read Oxygen level.
Is it possible to add Oxygen SpO2 level reading to ConnectIQ SDK?
support for SpO2 was added in CIQ 3.2. I don't know if the 5X plus supports it but the F6 does.
developer.garmin.com/.../Info.html
edit: Looking at the 4.0 docs the F5X plus is supported.
now you can get it from [Toybox.SensorHistory]
using Toybox.SensorHistory; using Toybox.Lang; using Toybox.System; // Create a method to get the SensorHistoryIterator object function getIterator() { // Check device for SensorHistory compatibility if ((Toybox has :SensorHistory) && (Toybox.SensorHistory has :getElevationHistory)) { return Toybox.SensorHistory.getElevationHistory({}); } return null; } // Store the iterator info in a variable. The options are 'null' in // this case so the entire available history is returned with the // newest samples returned first. var sensorIter = getIterator(); // Print out the next entry in the iterator if (sensorIter != null) { System.println(sensorIter.next().data); }
Have you tested this code on real device (especially you use elevation instead of oxygen history) and you are sure it run well?
I've reported a bug but when and if it will be fixed, nobody knows...