From: @CHENG <2393524978@qq.com> Date: Fri, 10 May 2024 06:45:59 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=cadde011baef6d74900b79eb11fcd8b17d46add8;p=mirrors%2FASR3603_Z5.git gengxin --- 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 20120975..5cea4dc6 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 @@ -102,7 +102,7 @@ void mmi_tsensor_body_value_get(float * body_value) bool mmi_health_measure_wear_state_get(void) { - bool is_wear = TRUE; + bool is_wear = true; if(0 == mmi_hsensor_measure_get_wear_status()) is_wear = false; diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.c index ad9089b3..adc5798e 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.c @@ -40,75 +40,6 @@ static mmi_remind_screen_info_t s_remind_info[] = { MMI_REMIND_TYPE_MAX, 0, NULL, NULL}, }; -#ifdef __MMI_REMIND_take_off_SUPPORT__ - -static void * take_off_remind_timer = NULL; -static bool take_on_or_off; - -static void mmi_sedentary_remind_trigger(uint32_t para); - -void mmi_take_off_remind_timer_stop(void) -{ - if(NULL != take_off_remind_timer) - { - uos_timer_stop(take_off_remind_timer); - take_off_remind_timer=NULL; - - } -} - -static void mmi_take_off_remind_trigger(uint32_t para) -{ - - if(true != mmi_health_measure_wear_state_get() && take_on_or_off==true) - { - watch_wakeup_lcd(true); - mmi_protocol_action_take_off(); - printf("test_take_off %d or %d \n",mmi_health_measure_wear_state_get(),take_on_or_off); - take_on_or_off=false; - } - else if(true == mmi_health_measure_wear_state_get() && take_on_or_off!=true) - { - watch_wakeup_lcd(true); - //mmi_protocol_action_take_on(); - //printf("test_take_off %d or %d \n",mmi_health_measure_wear_state_get(),take_on_or_off); - take_on_or_off=true; - } - - printf("test_take_off________1111 %d or %d \n",mmi_health_measure_wear_state_get(),take_on_or_off); - mmi_take_off_remind_timer_start(); -} - - - -void mmi_take_off_remind_timer_start(void) -{ - //take_on_or_off=mmi_health_measure_wear_state_get(); - if(NULL != take_off_remind_timer) - uos_timer_stop(take_off_remind_timer); - else - uos_timer_create(&take_off_remind_timer); - uos_timer_start(take_off_remind_timer, MS_TO_TICKS(1 * 60 * 1000), 0, mmi_take_off_remind_trigger, NULL); -} - -void mmi_take_off_remind_init(void) -{ - - if(mmi_take_off_switch_get()) - { - printf("[@CHENG_DEBUG][%s][%d]: nv write fail\n", __FUNCTION__, __LINE__); - take_on_or_off=mmi_health_measure_wear_state_get(); - mmi_take_off_remind_timer_start(); - - } - -} - - - -#endif - - #ifdef __MMI_REMIND_WAKE_UP_SUPPORT__ static nv_watch_remind_item_t s_remind_wake_up_data = {0}; diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.h b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.h index 296ff962..dd21b828 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.h +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_remind/mmi_remind.h @@ -88,25 +88,6 @@ void mmi_remind_screen_active(void); void mmi_remind_mission_check(hal_rtc_t cur_time); void mmi_remind_data_init(void); -#ifdef __MMI_REMIND_take_off_SUPPORT__ - -void mmi_take_off_remind_timer_stop(void); - - -static void mmi_take_off_remind_trigger(uint32_t para); - - -void mmi_take_off_remind_timer_start(void); - - -void mmi_take_off_remind_init(void); - - -#endif - - - - #endif diff --git a/2.sdk/sdk/gui/lv_watch/lv_watch.c b/2.sdk/sdk/gui/lv_watch/lv_watch.c index 453b11b8..b2c47103 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_watch.c +++ b/2.sdk/sdk/gui/lv_watch/lv_watch.c @@ -576,10 +576,6 @@ static lv_obj_t * watch_create(bool silentReset) #ifdef __MMI_ZHSX_SUPPORT__ mmi_data_init_after_watch_create(); #endif -#ifdef __MMI_REMIND_WAKE_UP_take_off_SUPPORT__ -printf("123456789"); - mmi_take_off_remind_init(); -#endif return obj; } 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 25636c37..77fa4088 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 @@ -3103,18 +3103,6 @@ bool mmi_protocol_fzd_parse_SERVER_SET_TAKE_OFF_SWITCH(unsigned char * next_buff uint32_t value = atoi(next_buff); mmi_take_off_switch_set(value); - #ifdef __MMI_REMIND_take_off_SUPPORT__ - if(value) - { - mmi_take_off_remind_init(); - } - else - { - mmi_take_off_remind_timer_stop(); - } - #endif - - return result; } diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c index 8c63407c..80f3f450 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c @@ -383,12 +383,11 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned case MMI_FZD_SERVER_SET_FALL_DOWN_SWITCH: mmi_protocol_fzd_parse_SERVER_SET_FALL_DOWN_SWITCH(next_buff, next_buff_len); break; - #ifdef __MMI_REMIND_take_off_SUPPORT__ + case MMI_FZD_SERVER_SET_TAKE_OFF_SWITCH: mmi_protocol_fzd_parse_SERVER_SET_TAKE_OFF_SWITCH(next_buff, next_buff_len); break; - #endif - + #ifdef __MMI_REMIND_WAKE_UP_SUPPORT__ case MMI_FZD_SERVER_SET_REMIND_WAKE_UP: mmi_protocol_fzd_parse_SERVER_SET_REMIND_WAKE_UP(next_buff, next_buff_len);