__MMI_CUSTOM_HENGAI_SLEEP_K18__
author@CHENG <2393524978@qq.com>
Mon, 30 Sep 2024 07:15:35 +0000 (15:15 +0800)
committer@CHENG <2393524978@qq.com>
Mon, 30 Sep 2024 07:15:35 +0000 (15:15 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.c
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.h
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c

index a32d1da..da2aad3 100644 (file)
@@ -2442,6 +2442,10 @@ void mmi_hengai_health_lib_act_code_set(char * act_code)
        #else
                mmi_hengai_health_lib_activation_feedback();
        #endif
+       #ifdef __MMI_CUSTOM_HENGAI_SLEEP_K18__
+               char * req_code = mmi_hengai_health_lib_req_code_get();
+               mmi_hengai_health_sleep_lib_active(req_code, act_code);
+       #endif
        }
 }
 
index 31e9d79..6ca493d 100644 (file)
@@ -424,6 +424,17 @@ void mmi_hengai_get_sleep_data_stop(void)
        lv_fs_remove(HENGAI_SLEEP_RESULT_FILE);
 #endif
 }
+
+void mmi_hengai_health_sleep_lib_active(char * req_code, char * act_code)
+{
+       if(NULL == req_code || NULL == act_code)
+               return;
+       
+       printf("[@CHENG_DEBUG][%s][%d]: req_code=%s\n", __FUNCTION__, __LINE__, req_code);
+       printf("[@CHENG_DEBUG][%s][%d]: act_code=%s\n", __FUNCTION__, __LINE__, act_code);
+       int ret = activate_algorithm((unsigned char *)req_code, strlen(req_code), (unsigned char *)act_code, strlen(act_code));
+       printf("[@CHENG_DEBUG][%s][%d]: ret=%d\n", __FUNCTION__, __LINE__, ret);
+}
 #endif
 
 
index 4251b13..a001880 100644 (file)
@@ -22,6 +22,7 @@ extern "C" {
 void mmi_hengai_get_sleep_data_start(void);
 void mmi_hengai_get_sleep_data_stop(void);
 
+void mmi_hengai_health_sleep_lib_active(char * req_code, char * act_code);
 
 
 #endif
index 4ccd86f..a880420 100644 (file)
@@ -325,7 +325,7 @@ void mmi_watch_authenticate_action(void)
                        }
                        else
                        {
-                               PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: false\n", __FUNCTION__, __LINE__);
+                               PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: false.imei=%s\n", __FUNCTION__, __LINE__, imei);
                                //cplog_printf("[@CHENG_DEBUG][%s][%d]: false\n", __FUNCTION__, __LINE__);
                        }
                }