class heart_rate
Diff: pixart_heart_rate.cpp
- Revision:
- 3:6d8153f8c92e
- Parent:
- 2:5cb0e405a24c
- Child:
- 4:90dfc6d7461b
--- a/pixart_heart_rate.cpp Fri Oct 27 06:39:17 2017 +0000 +++ b/pixart_heart_rate.cpp Fri Oct 27 06:45:49 2017 +0000 @@ -7,7 +7,13 @@ #include <stdlib.h> -#define log_printf(...) m_debug_print_handler(__VA_ARGS__) +#define debug_printf(...) \ + do { \ + if (m_debug_print_handler) \ + m_debug_print_handler(__VA_ARGS__); \ + } while (0) + +#define log_printf(...) debug_printf(__VA_ARGS__) namespace pixart { @@ -224,6 +230,8 @@ int hr_trust_level = 0; pah8series_get_hr_trust_level(&hr_trust_level); + debug_printf("ret = %d, hr = %d, hr_trust_level = %d\n", ret, (int)hr, hr_trust_level); + if (ret == MSG_SUCCESS || ret == MSG_HR_READY) m_result.ret = ret_success;