HRM Green Sensor Issue

HRM Green Sensor Issue

BY 13 May 2018 Native Application Development

I am writing a wearable app, and am testing it on my Samsung S3 Frontier smartwatch, but am confused about the values I am getting for the HRM Green sensor.

The documentation says that the SENSOR_HRM_LED_GREEN sensor has the range: 0-1,081,216.

However, when I query the sensor_get_min_range(), sensor_get_max_range(), and sensor_get_resolution(), it reports back: 0.0 – 1.0 with resolution of 1.0.

(The resolution of 1.0 makes sense since the sensor value is really an INT, although it is reported via a FLOAT.  But the 0.0-1.0 does not make sense.)

Then, when I start the listener, and receive the callbacks, the sensor_event_s parameter reports the sensor value as a FLOAT, with values way above 1,081,216, such as the values listed at the end of this post.

So my question is whether the values I am receiving are correct, or if they really should have been under 1,081,216.

Feedback from anybody who has had experience with this sensor would be much appreciated.

 

Example values reported (10 ms interval) – the values are floating point values, but they all have 0’s after the decimal point (as expected):

4160009
4157253
4157253
4157253
4157253
4157253
4156108
4156108
4156108
4156108
4156108
4155771
4155771
4155771
4155771
4155771
4155041
4155041
4155041
4155041
4155041
4155563
4155563
4155563
4155563
4155563
4155522
4155522
4155522
4155522
4155522
4156217
4156217
4156217
4156217
4156217
4157009
4157009
4157009
4157009

 

 

 

Written by