From: @CHENG <2393524978@qq.com> Date: Fri, 2 Feb 2024 03:53:27 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=7d86abba9bee1833c20418f7c0e65a6156c3c347;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c index 4d90969b..ed3c0028 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c +++ b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c @@ -27,6 +27,11 @@ void mmi_ui_msg_action_watch_power_off(void) mmi_ui_msg_action_no_para_msg(MMI_MSG_WATCH_POWER_OFF); } +void mmi_ui_msg_action_watch_reboot(void) +{ + mmi_ui_msg_action_no_para_msg(MMI_MSG_WATCH_REBOOT); +} + void mmi_ui_msg_action_watch_searching(void) { mmi_ui_msg_action_no_para_msg(MMI_MSG_WATCH_SEARCHING); diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h index 6ead1fd5..f53cac6d 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h +++ b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h @@ -56,6 +56,7 @@ void mmi_watch_lv_ui_message_action(uint16_t msgid, void * msg); void mmi_ui_msg_action_watch_factory(void); void mmi_ui_msg_action_watch_power_off(void); +void mmi_ui_msg_action_watch_reboot(void); void mmi_ui_msg_action_watch_searching(void); #ifdef __MMI_WECHAT_SUPPORT__ void mmi_ui_msg_action_wechat_incoming(void); diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c index 947ea7de..94fb44a9 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c +++ b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c @@ -367,14 +367,16 @@ void watch_ui_message_handle(uint16_t msgid, void * msg) #endif case MMI_MSG_WATCH_FACTORY: - //printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); mmi_ui_msg_update_watch_factory(); break; case MMI_MSG_WATCH_POWER_OFF: - //printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); mmi_ui_msg_update_watch_power_off(); break; + + case MMI_MSG_WATCH_REBOOT: + mmi_ui_msg_update_watch_reboot(); + break; case MMI_MSG_WATCH_SEARCHING: //printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h index 0958d453..61b3e3dc 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h +++ b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h @@ -102,6 +102,7 @@ enum #endif MMI_MSG_WATCH_FACTORY, MMI_MSG_WATCH_POWER_OFF, + MMI_MSG_WATCH_REBOOT, MMI_MSG_WATCH_SEARCHING, #ifdef __MMI_WECHAT_SUPPORT__ MMI_MSG_WECHAT_INCOMING, 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 3f8272e6..9fd45847 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 @@ -790,6 +790,19 @@ bool mmi_protocol_fzd_parse_SERVER_SET_POWEROFF(unsigned char * next_buff, unsig return result; } +bool mmi_protocol_fzd_parse_SERVER_SET_REBOOT(unsigned char * next_buff, unsigned int next_buff_len) +{ + bool result = false; + MMI_PROTOCOL_FZD_ACTION_ENUM action = MMI_FZD_SERVER_SET_REBOOT; + + result = true; + mmi_protocol_fzd_send_without_data(action); + + mmi_watch_reboot_aciton(); + + return result; +} + bool mmi_protocol_fzd_parse_SERVER_FIND_WATCH(unsigned char * next_buff, unsigned int next_buff_len) { bool result = false; diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h index f84e5757..6559943f 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h @@ -137,6 +137,7 @@ typedef enum MMI_FZD_SERVER_SET_CENTER_NUMBER, MMI_FZD_SERVER_SET_MONITOR, MMI_FZD_ACTION_UNBIND, + MMI_FZD_SERVER_SET_REBOOT, #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ #if defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_WULIAN__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_FZD__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_TONGXIN__) @@ -254,8 +255,8 @@ bool mmi_protocol_fzd_parse_SERVER_GET_CUR_LOCATION(unsigned char * next_buff, u bool mmi_protocol_fzd_parse_SERVER_SET_UD_INTERVAL(unsigned char * next_buff, unsigned int next_buff_len); bool mmi_protocol_fzd_parse_SERVER_SET_FACTORY(unsigned char * next_buff, unsigned int next_buff_len); - bool mmi_protocol_fzd_parse_SERVER_SET_POWEROFF(unsigned char * next_buff, unsigned int next_buff_len); +bool mmi_protocol_fzd_parse_SERVER_SET_REBOOT(unsigned char * next_buff, unsigned int next_buff_len); bool mmi_protocol_fzd_parse_SERVER_FIND_WATCH(unsigned char * next_buff, unsigned int next_buff_len); 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 94e83e8b..3636d2a4 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 @@ -60,6 +60,7 @@ static unsigned char * mmi_protocol_fzd_action_string_get(MMI_PROTOCOL_FZD_ACTIO {MMI_FZD_SERVER_SET_CENTER_NUMBER, "CENTER"}, {MMI_FZD_SERVER_SET_MONITOR, "MONITOR"}, {MMI_FZD_ACTION_UNBIND, "DLT"}, + {MMI_FZD_SERVER_SET_REBOOT, "REBOOT"}, #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL_WULIAN__ @@ -312,6 +313,10 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned case MMI_FZD_ACTION_UNBIND: break; + case MMI_FZD_SERVER_SET_REBOOT: + mmi_protocol_fzd_parse_SERVER_SET_REBOOT(next_buff, next_buff_len); + break; + #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ #if defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_WULIAN__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_FZD__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_TONGXIN__) case MMI_FZD_WATCH_GET_VC_CONFIG: diff --git a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c index 382f5e93..82936cd0 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c @@ -149,6 +149,19 @@ void mmi_watch_power_off_aciton(void) mmi_ui_msg_action_watch_power_off(); } +void mmi_ui_msg_update_watch_reboot(void) +{ + mmi_watch_restart(); +} + +void mmi_watch_reboot_aciton(void) +{ + SUNDRY_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); + + mmi_watch_wake_up(); + mmi_ui_msg_action_watch_reboot(); +} + static TIMER_ID s_watch_search_timer_id = NULL; static TIMER_ID s_watch_falldwon_id = NULL; diff --git a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.h b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.h index e4877067..ca4d1af1 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.h @@ -46,6 +46,8 @@ void mmi_ui_msg_update_watch_factory(void); void mmi_watch_factory_aciton(void); void mmi_ui_msg_update_watch_power_off(void); void mmi_watch_power_off_aciton(void); +void mmi_ui_msg_update_watch_reboot(void); +void mmi_watch_reboot_aciton(void); #define MMI_WATCH_SEARCH_DURATION (1000 * 60) // ms