From: @CHENG <2393524978@qq.com> Date: Mon, 30 Sep 2024 07:15:35 +0000 (+0800) Subject: __MMI_CUSTOM_HENGAI_SLEEP_K18__ X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=9131ac3124745eb3f78cb36d03af863f1afd9b8c;p=mirrors%2FASR3603_Z5.git __MMI_CUSTOM_HENGAI_SLEEP_K18__ --- diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c index a32d1dac..da2aad39 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c @@ -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 } } diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.c b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.c index 31e9d795..6ca493d6 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.c @@ -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 diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.h b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.h index 4251b134..a001880b 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.h +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_k18.h @@ -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 diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c index 4ccd86f9..a880420e 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c @@ -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__); } }