Ticket Created
over 4 years ago

WERETECH-9599

Toybox.SensorHistory.getOxygenSaturationHistory strange samples

I am getting really strange results reading the Toybox.SensorHistory.getOxygenSaturationHistory. Although it seems to work fine in the simulator, on the Fenix 6X pro I get extreme high e.g.55311017190201917345628160.000000 and extremely low e.g. -14393159110885376.000000 results among results around the 29 which is also very deadly when it would be an accurate spO2 reading. Also the values returned by the iterator may differ between subsequent calls.  Is this a bug in the recently released 3.2 SDK? is anyone else also experiencing this issue? 

  • Travis - you could move this thread to bug reports?  Here's a zip of the project I've been using: /cfs-file/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-5f0a3292-9daf-48e8-9168-e638f7e86748/o2.zip And here's what that code looks like in the sim: /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-5f0a3292-9daf-48e8-9168-e638f7e86748/pastedimage1598864501818v1.png Like the earlier version but I added the display of the min, max, total number of samples, and the next 6 samples.
  • Yeah, that is bad. That looks like uninitialized data or something.
  • samples I got yesterday.. but they may differ between calls: 

    29.405024
    29.405024
    0.000000
    -0.000000
    -0.000000
    -569949123702998054207488.000000
    28.413343
    0.000000
    -0.000000
    870469165207855127433576448.000000
    -1584634025014722560.000000
    27.648922
    0.000000
    8.141073
    55311017190201917345628160.000000
    -6703505473536.000000
    26.409323
    0.000000
    0.000000
    -0.000000
    -14393159110885376.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    -35304639561728.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000

  • I'll be doing a bug report on this.  It seems all the samples I see have a 0 value.  If I request 10, I get 10 - all zero.  It could also be I don't have something set correctly on the watch.  Under Sensors&Accessories, I have Pulse Ox Mode set "All Day"
  • [quote userid="3042" url="~/developer/connect-iq/f/discussion/237088/toybox-sensorhistory-getoxygensaturationhistory-strange-samples/1125053"]SensorHistory is 0.000000 but I'm not sure how often a value is saved to history.  I've only been running for 5 minutes.[/quote]

    Sensor History should be updated hourly.