Languages

Menu
Sites
Language
HRM 측정값 리턴 타입
 
네이티브 애플리케이션 센서 API 문서에 HRM 측정값은 int로 리턴한다고 되어있습니다. 
하지만, 다음과 같은 코드를 실행할 경우 정상적인 값이 출력되지 않습니다.
 
dlog_print(DLOG_INFO, TAG, "%d" , event->values[0]);

그러나 아래 코드와 같이, HRM Sensor 측정값 values[0]을 float 타입으로 받으면, Max와 Min 사이의 값이 정상 출력됩니다.

dlog_print(DLOG_INFO, TAG, "%f" , event->values[0]);

따라서 HRM Sensor 문서 측정값 Type을 int에서 float으로 수정해야 합니다.

Edited by: Noel Yoo on 13 Apr, 2016

Responses

2 Replies
daniel kim

안녕하세요.

emulator상으로도 int type으로 받으면 Gear S2와 동일하게 비정상적인 값이 나오는 것 같습니다.  문서가 update 되어야 할 것 같습니다.

Masum Talukder

Hi,

I have also tried the same and found that "%d" is not working rather "%f" is giving me output.

So the documentation should be updated accordingly.