From: @CHENG <2393524978@qq.com> Date: Wed, 11 Dec 2024 08:57:44 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=a73a4b536c16e9552832a294dccec142397d5667;p=mirrors%2FASR3603_Z5.git gengxin --- 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 1a973512..b8db9239 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 @@ -1314,11 +1314,11 @@ static void mmi_hengai_tcp_algorithm_login_cb(uint32_t para) if(NULL != s_delay_timer_id) { uos_timer_stop(s_delay_timer_id); - uos_timer_delete(s_delay_timer_id); - s_delay_timer_id = NULL; + //uos_timer_delete(s_delay_timer_id); + //s_delay_timer_id = NULL; } - mmi_hengai_tcp_algorithm_interface_login_action(); + mmi_hengai_tcp_algorithm_login_msg_send(); } void mmi_hengai_tcp_algorithm_login_action(void) @@ -1331,10 +1331,21 @@ void mmi_hengai_tcp_algorithm_login_action(void) } uos_timer_stop(s_delay_timer_id); uos_timer_start(s_delay_timer_id, MS_TO_TICKS(1000*10), 0, mmi_hengai_tcp_algorithm_login_cb, NULL); +} + +void mmi_hengai_tcp_algorithm_login_msg_action(void) +{ + if(NULL != s_delay_timer_id) + { + //uos_timer_stop(s_delay_timer_id); + uos_timer_delete(s_delay_timer_id); + s_delay_timer_id = NULL; + } #ifdef __MMI_CUSTOM_HENGAI_SLEEP_K18__ mmi_hengai_health_sleep_activation_check(); #endif + mmi_hengai_tcp_algorithm_interface_login_action(); } bool mmi_hengai_health_data_parse(unsigned char * next_buff, unsigned int next_buff_len) diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h index b81fda8f..8a5d2287 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h @@ -74,6 +74,7 @@ void mmi_hengai_tcp_bp_measure_raw_data_send(void); void mmi_hengai_tcp_bp_calibrate_raw_data_send(uint8_t calibrate_times, uint16_t bp_value_high, uint16_t bp_value_low); //void mmi_hengai_tcp_algorithm_interface_login_action(void); void mmi_hengai_tcp_algorithm_login_action(void); +void mmi_hengai_tcp_algorithm_login_msg_action(void); bool mmi_hengai_health_data_parse(unsigned char * next_buff, unsigned int next_buff_len); #else diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c b/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c index bdec4315..c4a69b21 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c @@ -1137,6 +1137,15 @@ void mmi_health_measure_factory_mode_clean(void) _lv_memset_00(&s_health_measure_run_data, sizeof(s_health_measure_run_data)); } +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +#ifdef __MMI_CUSTOM_HENGAI_HEALTH_UPLOAD_USE_TCP__ +void mmi_hengai_tcp_algorithm_login_msg_send(void) +{ + mmi_health_measure_task_msg_send(MMI_HEALTH_HENGAI_ALGORITHM_LOGIN, NULL); +} +#endif +#endif + #define MMI_HEALTH_MEASURE_TASK_PRIORITY 221 @@ -1235,6 +1244,14 @@ static void mmi_health_measure_task_handle(void * param) break; #endif + #ifdef __MMI_CUSTOM_HENGAI_HEALTH__ + #ifdef __MMI_CUSTOM_HENGAI_HEALTH_UPLOAD_USE_TCP__ + case MMI_HEALTH_HENGAI_ALGORITHM_LOGIN: + mmi_hengai_tcp_algorithm_login_msg_action(); + break; + #endif + #endif + default: break; } diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.h b/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.h index 3f5ca714..9bba5ade 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.h +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.h @@ -145,6 +145,12 @@ typedef enum MMI_HEALTH_MEASURE_MSG_MICRO_CHECKUP_FINISHED, #endif +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +#ifdef __MMI_CUSTOM_HENGAI_HEALTH_UPLOAD_USE_TCP__ + MMI_HEALTH_HENGAI_ALGORITHM_LOGIN, +#endif +#endif + MMI_HEALTH_MEASURE_MSG_ID_END }MMI_HEALTH_MEASURE_MSG_ID_E; @@ -165,6 +171,11 @@ typedef struct }mmi_health_measure_msg_param_t; +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +#ifdef __MMI_CUSTOM_HENGAI_HEALTH_UPLOAD_USE_TCP__ +void mmi_hengai_tcp_algorithm_login_msg_send(void); +#endif +#endif void mmi_health_measure_task_msg_send(MMI_HEALTH_MEASURE_MSG_ID_E msg_id, void * param); void mmi_health_measure_task_init(void); diff --git a/2.sdk/sdk/gui/lv_watch/lv_watch.c b/2.sdk/sdk/gui/lv_watch/lv_watch.c index 1c725559..63f0a86d 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_watch.c +++ b/2.sdk/sdk/gui/lv_watch/lv_watch.c @@ -86,6 +86,12 @@ static bool watch_ambient = false; #ifdef __MMI_ZHSX_SUPPORT__ static void mmi_data_init_before_watch_create(void) { + // create task + mmi_protocol_timing_task_create(); +#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__ + mmi_health_measure_task_init(); +#endif + #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ mmi_video_call_jrtc_config_init_00(); mmi_video_call_contact_nv_read(); @@ -96,11 +102,7 @@ static void mmi_data_init_before_watch_create(void) #ifdef __MMI_USER_PROFILE_SUPPORT__ mmi_watch_user_profile_nv_read(); #endif - //mmi_watch_location_mission_list_init(); -//#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__ - //mmi_health_measure_task_init(); - //mmi_health_measure_timed_info_nv_read(); -//#endif + #ifdef __MMI_CUSTOM_HENGAI_HEALTH__ mmi_hengai_health_data_nv_read(); #endif @@ -116,12 +118,6 @@ static void mmi_data_init_after_watch_create(void) { // timing mission app_adaptor_timing_control_init(); - - // create task - mmi_protocol_timing_task_create(); -#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__ - mmi_health_measure_task_init(); -#endif #ifdef __MMI_WECHAT_SUPPORT__ mmi_wechat_msg_info_init(); 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 b2ea1fab..71c8c231 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 @@ -589,7 +589,7 @@ void mmi_protocol_timing_task_create(void) PROTOCOL_TIMING_MSG_QUEUE_SIZE, PROTOCOL_TIMING_TASK_STACK_SIZE, PROTOCOL_TIMING_TASK_PRIORITY, - "mmi_protocol_timing_task"); + "protocol_timing"); PROTOCOL_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: task_id=0x%x\n",__FUNCTION__,__LINE__, s_protocol_timing_task_id); } diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c index 7241802d..2068e489 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c @@ -585,7 +585,7 @@ static void mmi_protocol_fzd_login_check_start(void) { uos_timer_stop(s_login_timer_id); } - uos_timer_start(s_login_timer_id, MS_TO_TICKS(1000 * 30), 0, mmi_protocol_fzd_login_check_cb, NULL); + uos_timer_start(s_login_timer_id, MS_TO_TICKS(1000 * 20), 0, mmi_protocol_fzd_login_check_cb, NULL); } bool mmi_protocol_fzd_action_LINK(void)