语言

Menu
Sites
Language
SENSOR_HRM_LED_GREEN data bigger than range

I use HRM LED Green Sensor,

https://developer.tizen.org/ko/development/guides/native-application/location-and-sensors/device-sensors?langredirect=1#hrm_green

HRM green light Max value is 1081216 but my data is bigger then max value

how to solve this problem?

example

2676046
2676046
2688466
2688466
2691046
2691046
2691046
2692194
2692194
2980486
2980486
2980486
3021927
3021927
3029050
3029050
3031080
3031080
3031080
3032341
3032341
3176463
3176463
3176463

 

case SENSOR_HRM_LED_GREEN: {
float light = event->values[0];
sprintf(tmp_txt, "%.2f", light);
dlog_print(DLOG_INFO, LOG_TAG,"PPG: %s", tmp_txt);
fprintf(fp1, "%.0f\r\n", light);
break;
}

 

响应

3 回复
Shaswati Saha

Would you please try changing type of variable "light" from float to int?

최형탁 최

variable "light" type change float to int

try it but nothing solve 

 

case SENSOR_HRM_LED_GREEN: {
int light = event->values[0];
dlog_print(DLOG_INFO, LOG_TAG,"PPG: %d", light);
fprintf(fp1, "%d,", light);
break;
}
Shaswati Saha

The value shouldn't be larger than Max value which is documented. You may report it as a bug into JIRA system.