class heart_rate

Revision:
2:5cb0e405a24c
Parent:
1:e9f4fb198b63
Child:
3:6d8153f8c92e
--- a/pixart_heart_rate.cpp	Fri Oct 27 06:32:02 2017 +0000
+++ b/pixart_heart_rate.cpp	Fri Oct 27 06:39:17 2017 +0000
@@ -7,7 +7,7 @@
 #include <stdlib.h>
 
 
-#define log_printf(...)     m_debug_printf_handler(__VA_ARGS__)
+#define log_printf(...)     m_debug_print_handler(__VA_ARGS__)
 
 
 namespace pixart {
@@ -24,7 +24,7 @@
         : PPG_MAX_SAMPLE_NUM(ppg_max_sample_num)
         , PPG_CH_NUM(2)
         , ACCEL_MAX_SAMPLE_NUM(accel_max_sample_num)
-        , m_debug_printf_handler(NULL)
+        , m_debug_print_handler(NULL)
         , m_time_to_millisec_handler(time_to_millisec_handler)
         , m_alg_buffer(NULL)
         , m_gravity_mode(gravity_4g)
@@ -64,9 +64,9 @@
         return true;
     }
     
-    void heart_rate::set_debug_printf(DEBUG_PRINTF_HANDLE handler)
+    void heart_rate::enable_debug_print(DEBUG_PRINT_HANDLE handler)
     {
-        m_debug_printf_handler = handler;
+        m_debug_print_handler = handler;
     }
     
     void heart_rate::reset()
@@ -213,7 +213,7 @@
         pah8series_data.mems_data          = &hr_accel_data[0];
         ++m_frame_count;
         
-        if (m_debug_printf_handler)
+        if (m_debug_print_handler)
             log_pah8series_data(&pah8series_data);
         
         uint8_t ret = pah8series_entrance(&pah8series_data);