From: CCC <2393524978@qq.com> Date: Mon, 7 Aug 2023 06:46:46 +0000 (+0800) Subject: gengxin: LK->PING->KA X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=689b396d89d56d7ce13970428b465390403a3af4;p=mirrors%2FASR3603_Z5.git gengxin: LK->PING->KA --- 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 09227e0c..9af6f0c6 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 @@ -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) { diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.h b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.h index c6e17ae4..9e9e5e05 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.h @@ -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); 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 d7bfa16f..8d266857 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 @@ -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(); 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 2c497e21..f0fdfc70 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 @@ -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); diff --git a/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_tcp/mmi_modem_tcp_msg_handler_impl.c b/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_tcp/mmi_modem_tcp_msg_handler_impl.c index cc531caf..37d6b44d 100644 --- a/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_tcp/mmi_modem_tcp_msg_handler_impl.c +++ b/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_tcp/mmi_modem_tcp_msg_handler_impl.c @@ -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