gengxin
author@CHENG <2393524978@qq.com>
Fri, 2 Feb 2024 03:53:27 +0000 (11:53 +0800)
committer@CHENG <2393524978@qq.com>
Fri, 2 Feb 2024 03:53:27 +0000 (11:53 +0800)
2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c
2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h
2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c
2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c
2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.c
2.sdk/sdk/gui/lv_watch/mmi_sundry/mmi_sundry.h

index 4d90969..ed3c002 100644 (file)
@@ -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);
index 6ead1fd..f53cac6 100644 (file)
@@ -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);
index 947ea7d..94fb44a 100644 (file)
@@ -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__);
index 0958d45..61b3e3d 100644 (file)
@@ -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,
index 3f8272e..9fd4584 100644 (file)
@@ -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;
index f84e575..6559943 100644 (file)
@@ -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);
 
index 94e83e8..3636d2a 100644 (file)
@@ -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:
index 382f5e9..82936cd 100644 (file)
@@ -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;
index e487706..ca4d1af 100644 (file)
@@ -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