语言

Menu
Sites
Language
HRM Green Sensor Issue

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

 

 

 

响应

7 回复
K Johnson

Are you checking HRM sensor data keeping Gear Device on your wrist? Which Tizen version is running in your Gear S3 device?

Ippolito

It is running Tizen 3.0.0.2.

Yes, the Gear is on my wrist.

K Johnson

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.

Please check below image.

Ippolito

K Johnson,

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.

 

Ippolito

K Johnson,

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:

https://1drv.ms/f/s!AjTfwnGJIHyhgYp1khQm-Dk0LAjAEQ

The sample app writes out the data to a text file, such as the one here:

https://1drv.ms/t/s!AjTfwnGJIHyhgYt-BIk3kEnxe0JT5Q

The first few lines of the output file are:

sensorType = 14
minRange = 0.000000
maxRange = 1.000000
resolution = 1.000000
minInterval = 1
interval = 50

As you can see, I am getting a range of 0-1.

Fortunately, the recorded values in the output file (about 15 seconds worth) are from 2597772-2645690, which match the range of values that you obtained.

 Thanks,
Kim

K Johnson

I'll check it and get back to you soon.

Armaan-Ul- Islam

Hello kim,

Since the devices are evolving with fast pace...sensor chips are upgrading every now and then.

The sensor values you and K Johnson mentioned are expected possible values, Cause similar data is also received on my Gear Sport device. Seems like the Documentations are in need to be updated.