gengxin: LK->PING->KA
authorCCC <2393524978@qq.com>
Mon, 7 Aug 2023 06:46:46 +0000 (14:46 +0800)
committerCCC <2393524978@qq.com>
Mon, 7 Aug 2023 06:46:46 +0000 (14:46 +0800)
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.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/modem/mmi_modem_tcp/mmi_modem_tcp_msg_handler_impl.c

index 09227e0..9af6f0c 100644 (file)
@@ -298,12 +298,10 @@ void mmi_protocol_watch_heartbeat_action(void)
        }
 }
 
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
 bool mmi_protocol_watch_link_action(void)
 {
        return mmi_protocol_fzd_action_LINK();
 }
-#endif
 
 bool mmi_protocol_check_state_before_send_action(void)
 {
index c6e17ae..9e9e5e0 100644 (file)
@@ -64,9 +64,7 @@ void mmi_protocol_watch_timed_mission_action(void);
 void mmi_protocol_watch_heartbeat_stop(void);
 void mmi_protocol_watch_heartbeat_action(void);
 
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
 bool mmi_protocol_watch_link_action(void);
-#endif
 
 bool mmi_protocol_action_send_temperature(float temp_value);
 
index d7bfa16..8d26685 100644 (file)
@@ -496,9 +496,7 @@ static unsigned char * mmi_protocol_fzd_action_string_get(MMI_PROTOCOL_FZD_ACTIO
            {
                        {MMI_FZD_ACTION_NONE, "NONE"},          //MMI_FZD_ACTION_NONE
                        
-               #ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
                        {MMI_FZD_ACTION_LINK, "LK"},
-               #endif
                {MMI_FZD_ACTION_HEARTBEAT, "KA"},
                        {MMI_FZD_ACTION_BIND, "PING"},          //
                        {MMI_FZD_ACTION_GET_TIME, "LGZONE"},            //
@@ -602,11 +600,9 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned
 
        switch(action)
        {
-               #ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
                case MMI_FZD_ACTION_LINK:
                        mmi_protocol_fzd_parse_LINK(next_buff, next_buff_len);
                        break;
-               #endif
                
                case MMI_FZD_ACTION_HEARTBEAT:
                        mmi_protocol_fzd_parse_HEARTBEAT(next_buff, next_buff_len);
@@ -758,7 +754,6 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned
 }
 
 
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
 bool mmi_protocol_fzd_action_LINK(void)
 {
        return mmi_protocol_fzd_send_without_data(MMI_FZD_ACTION_LINK);
@@ -766,11 +761,14 @@ bool mmi_protocol_fzd_action_LINK(void)
 
 bool mmi_protocol_fzd_parse_LINK(unsigned char * next_buff, unsigned int next_buff_len)
 {
-       mmi_protocol_watch_heartbeat_action();
+       if(true != mmi_protocol_watch_bind_state_get())
+       {
+               mmi_protocol_fzd_action_bind();
+       }
+       //mmi_protocol_watch_heartbeat_action();
 
        return true;
 }
-#endif
 
 bool mmi_protocol_fzd_action_HEARTBEAT(void)
 {
@@ -804,10 +802,10 @@ bool mmi_protocol_fzd_action_HEARTBEAT(void)
 
 bool mmi_protocol_fzd_parse_HEARTBEAT(unsigned char * next_buff, unsigned int next_buff_len)
 {
-       if(true != mmi_protocol_watch_bind_state_get())
-       {
-               mmi_protocol_fzd_action_bind();
-       }
+       //if(true != mmi_protocol_watch_bind_state_get())
+       //{
+       //      mmi_protocol_fzd_action_bind();
+       //}
        if(0 == s_fzd_time_data_flag)
        {
                mmi_protocol_fzd_action_get_time();
@@ -848,6 +846,9 @@ bool mmi_protocol_fzd_parse_ACTION_BIND(unsigned char * next_buff, unsigned int
                {
                        mmi_protocol_watch_bind_state_set(true);
 
+                       //heartbeat
+                       mmi_protocol_watch_heartbeat_action();
+                       
                        // timing
                        mmi_protocol_watch_timed_mission_action();
 
index 2c497e2..f0fdfc7 100644 (file)
@@ -92,9 +92,7 @@ typedef enum
 {
     MMI_FZD_ACTION_NONE,       //0 nothing
 
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
        MMI_FZD_ACTION_LINK,
-#endif
        MMI_FZD_ACTION_HEARTBEAT, // tcp heartbeat
        MMI_FZD_ACTION_BIND, // 
        MMI_FZD_ACTION_GET_TIME,
@@ -181,22 +179,16 @@ void mmi_protocol_fzd_send_space_deinit(MMI_PROTOCOL_FZD_ACTION_ENUM action);
 
 bool mmi_protocol_fzd_send_cmd_check(MMI_PROTOCOL_FZD_ACTION_ENUM action);
 
-#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
 bool mmi_protocol_fzd_action_LINK(void);
-
 bool mmi_protocol_fzd_parse_LINK(unsigned char * next_buff, unsigned int next_buff_len);
-#endif
 
 bool mmi_protocol_fzd_action_HEARTBEAT(void);
-
 bool mmi_protocol_fzd_parse_HEARTBEAT(unsigned char * next_buff, unsigned int next_buff_len);
 
 bool mmi_protocol_fzd_action_bind(void);
-
 bool mmi_protocol_fzd_parse_ACTION_BIND(unsigned char * next_buff, unsigned int next_buff_len);
 
 bool mmi_protocol_fzd_action_get_time(void);
-
 bool mmi_protocol_fzd_parse_ACTION_GET_TIME(unsigned char * next_buff, unsigned int next_buff_len);
 
 bool mmi_protocol_fzd_parse_SERVER_GET_CUR_LOCATION(unsigned char * next_buff, unsigned int next_buff_len);
index cc531ca..37d6b44 100644 (file)
@@ -31,11 +31,11 @@ void cmdmsg_handler_login_impl(void *param)
 #ifdef __MMI_ZHSX_SUPPORT__
        printf("[@CHENG_DEBUG][%s][%d]: \n",__FUNCTION__,__LINE__);
 
-       #ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
+       //#ifdef __MMI_ZHSX_SUPPORT_WULIAN_SERVER__
        mmi_protocol_watch_link_action();
-       #else
-       mmi_protocol_watch_heartbeat_action();
-       #endif
+       //#else
+       //mmi_protocol_watch_heartbeat_action();
+       //#endif
 
 #else