From: @CHENG <2393524978@qq.com> Date: Fri, 15 Mar 2024 07:32:19 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=e5c33ad5566c750eaa315e4b854b9a5a6295e4c3;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c index efc31cc5..aec80357 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c @@ -93,7 +93,10 @@ void mmi_hengai_bp_back_measure_finish(void) mmi_hengai_bp_raw_data_fill(); mmi_hengai_bp_measure_action_time_string_set(0); //mmi_hengai_bp_measuring_flag_set(false); - mmi_hengai_bp_measure_raw_data_send(); + if(true == mmi_protocol_check_state_before_send_action()) + { + mmi_hengai_bp_measure_raw_data_send(); + } } void mmi_hengai_bp_back_measure_action(void) @@ -425,7 +428,14 @@ void mmi_ui_msg_update_hengai_bp_measure_result(bool state, uint16_t bp_value_hi void mmi_hengai_bp_measure_data_send_task_cb(lv_task_t * task) { - mmi_hengai_bp_measure_raw_data_send(); + if(true == mmi_protocol_check_state_before_send_action()) + { + mmi_hengai_bp_measure_raw_data_send(); + } + else + { + mmi_hengai_bp_measure_result_timeout(NULL); + } } void mmi_hengai_bp_measure_finish_screen(void) @@ -935,7 +945,14 @@ void mmi_ui_msg_update_hengai_bp_calibrate_result(bool is_success) void mmi_hengai_bp_calibrate_second_data_send_task_cb(lv_task_t * task) { - mmi_hengai_bp_calibrate_raw_data_send(2, s_bp_value_high, s_bp_value_low); + if(true == mmi_protocol_check_state_before_send_action()) + { + mmi_hengai_bp_calibrate_raw_data_send(2, s_bp_value_high, s_bp_value_low); + } + else + { + mmi_hengai_bp_calibrate_result_timeout(NULL); + } } void mmi_hengai_bp_calibrate_finish_screen(void) @@ -986,9 +1003,16 @@ void mmi_hengai_bp_calibrate_end_input_event_cb(lv_obj_t * obj, lv_event_t e) if(1 == s_hengai_bp_calibrate_times) { - mmi_hengai_bp_calibrate_raw_data_send(1, s_bp_value_high, s_bp_value_low); - // once again - mmi_heng_ai_bp_calibrate_start_screen(); + if(true == mmi_protocol_check_state_before_send_action()) + { + mmi_hengai_bp_calibrate_raw_data_send(1, s_bp_value_high, s_bp_value_low); + // once again + mmi_heng_ai_bp_calibrate_start_screen(); + } + else + { + mmi_hengai_bp_calibrate_result_timeout(NULL); + } } 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 fa90d50d..eff13702 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 @@ -269,7 +269,7 @@ void mmi_health_measure_timed_info_nv_read(void) _lv_memset_00(&s_health_measure_timed_data, nv_data_length); } - //_lv_ll_clear(&s_health_measure_timed_ll); + _lv_ll_clear(&s_health_measure_timed_ll); _lv_ll_init(&s_health_measure_timed_ll, sizeof(MMI_HEALTH_MEASURE_TYPE_E)); } @@ -287,6 +287,10 @@ void mmi_health_measure_timed_info_nv_default(nv_watch_health_measure_timed_t * data->spo2_timed_interval = MMI_HEALTH_SPO2_TIMED_INTERVAL; } +void mmi_health_measure_timed_list_clear(void) +{ + _lv_ll_clear(&s_health_measure_timed_ll); +} void mmi_health_measure_timed_list_node_remove(MMI_HEALTH_MEASURE_TYPE_E measure_type) { @@ -378,6 +382,10 @@ bool mmi_health_measure_heart_timed_action(bool direct_trigger, uint32_t cur_tim { HEALTH_MEASURE_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: cur_stamp=%d,timed_stamp=%d\n", __FUNCTION__, __LINE__, cur_time_stamp, s_health_measure_heart_timed_time_stamp); + //char info_buf[64] = {0}; + //sprintf(info_buf, "heart:%d-%d-%d", direct_trigger, cur_time_stamp, s_health_measure_heart_timed_time_stamp); + //mmi_debug_info_write_to_file(info_buf); + mmi_health_measure_timed_list_node_add(MMI_HEALTH_MEASURE_HEART); if(true == mmi_health_measure_timed_list_trigger(MMI_HEALTH_MEASURE_HEART)) { @@ -916,6 +924,10 @@ bool mmi_health_measure_timed_measure_start(MMI_HEALTH_MEASURE_TYPE_E measure_ty return false; } + //char info_buf[32] = {0}; + //sprintf(info_buf, "measure_type:%d", measure_type); + //mmi_debug_info_write_to_file(info_buf); + _lv_memset_00(&s_health_measure_run_data, sizeof(s_health_measure_run_data)); s_health_measure_run_data.measure_state = MMI_HEALTH_MEASURE_STATE_TIMED; mmi_health_measure_start(measure_type, 0); 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 c00b5231..08b2306c 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 @@ -102,6 +102,7 @@ void mmi_health_measure_ui_measure_start(MMI_HEALTH_MEASURE_TYPE_E measure_type) void mmi_health_measure_timed_info_nv_read(void); void mmi_health_measure_timed_info_nv_default(nv_watch_health_measure_timed_t * data); +void mmi_health_measure_timed_list_clear(void); bool mmi_health_measure_timed_mission_action(uint32_t cur_time_stamp); bool mmi_health_measure_first_mission_action(uint32_t cur_time_stamp); diff --git a/2.sdk/sdk/gui/lv_watch/lv_watch.c b/2.sdk/sdk/gui/lv_watch/lv_watch.c index 2c9a0477..ff665b67 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_watch.c +++ b/2.sdk/sdk/gui/lv_watch/lv_watch.c @@ -96,11 +96,11 @@ 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 + //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 diff --git a/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.c b/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.c index bc78793c..cdd6225f 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.c @@ -25,9 +25,15 @@ static void mmi_watch_location_mission_timer_cb(uint32_t para); void mmi_watch_location_mission_list_init(void) { s_watch_location_mission_ll_locked = 0; + _lv_ll_clear(&s_watch_location_mission_ll); _lv_ll_init(&s_watch_location_mission_ll, sizeof(MMI_WATCH_LOCATION_TYPE_E)); } +void mmi_watch_location_mission_list_clear(void) +{ + _lv_ll_clear(&s_watch_location_mission_ll); +} + /* void mmi_watch_location_mission_list_node_remove(MMI_WATCH_LOCATION_TYPE_E location_type) { diff --git a/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.h b/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.h index fc96c855..4a9e5266 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_location/mmi_location.h @@ -111,6 +111,7 @@ typedef enum void mmi_watch_location_mission_list_init(void); +void mmi_watch_location_mission_list_clear(void); void mmi_watch_location_mission_timed_location_action(void); void mmi_watch_location_mission_current_location_action(void); 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 3c73de50..2c55e9db 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 @@ -409,6 +409,8 @@ void mmi_protocol_location_move_state_check(void) void mmi_protocol_timing_mission_action(void) { + mmi_protocol_timing_mission_stop(); + mmi_protocol_timing_task_create(); uint32_t cur_time_stamp = 0; @@ -419,6 +421,7 @@ void mmi_protocol_timing_mission_action(void) mmi_protocol_fzd_action_HEARTBEAT(); s_protocol_heartbeat_time_stamp = cur_time_stamp; + mmi_watch_location_mission_list_init(); mmi_protocol_action_location(); s_protocol_timed_location_time_stamp = cur_time_stamp; mmi_protocol_location_move_state_check(); @@ -427,8 +430,8 @@ void mmi_protocol_timing_mission_action(void) s_protocol_timed_weather_time_stamp = cur_time_stamp; #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__ - //mmi_health_measure_task_init(); - //mmi_health_measure_timed_info_nv_read(); + mmi_health_measure_task_init(); + mmi_health_measure_timed_info_nv_read(); mmi_health_measure_first_mission_action(cur_time_stamp); #endif @@ -442,6 +445,10 @@ void mmi_protocol_timing_mission_action(void) void mmi_protocol_timing_mission_stop(void) { + //char info_buf[64] = {0}; + //sprintf(info_buf, "mmi_protocol_timing_mission_stop"); + //mmi_debug_info_write_to_file(info_buf); + if(NULL != s_protocol_timing_timer) { uos_timer_stop(s_protocol_timing_timer); @@ -455,6 +462,10 @@ void mmi_protocol_timing_mission_stop(void) uos_timer_delete(s_protocol_location_move_check_timer); s_protocol_location_move_check_timer = NULL; } + + mmi_watch_location_mission_list_clear(); + + mmi_health_measure_timed_list_clear(); } diff --git a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c index 13d021c5..7baf3f5a 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_common.c @@ -257,7 +257,7 @@ bool mmi_debug_info_write_to_file(char * info_buf) char str_time[24] = {0}; Hal_Rtc_Gettime(&cur_time); - sprintf(str_time, "\n[%04d%02d%02d_%02d%02d%02d]", + sprintf(str_time, "\n[%04d%02d%02d_%02d%02d%02d]:", cur_time.tm_year, cur_time.tm_mon, cur_time.tm_mday,