You are here

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):

I've tried to test this issue and found an interesting fact while implementing the whole thing. I also got values larger than the max value in documentation. Tested both in Tizen 3.0 and 2.3.1 and found larger value for both. Then I found that now, sensor_get_max_range() API is giving a different value from the value mentioned in documentation and your data doesn't exceed that. So, according to my opinion there's chance of being right for the value you've posted.

Thanks for your time investigating. Where it says "Max Value 1065353216", is this the value you are getting back from sensor_get_max_range() method? When I call this same method, I am getting "1.0" back. So something still seems wrong with my implementation.

So I am comfortable that the values I am getting are legit. However, I am confused why when I call sensor_get_max_range(), I get a different number than you. So I went back to the code to confirm I am calling the method correctly, and it appears that I am. So for comparison purposes, I condensed my code into a sample app, and posted the code at: