优化
author@CHENG <2393524978@qq.com>
Fri, 11 Oct 2024 04:09:54 +0000 (12:09 +0800)
committer@CHENG <2393524978@qq.com>
Fri, 11 Oct 2024 04:09:54 +0000 (12:09 +0800)
2.sdk/sdk/gui/lv_watch/lv_watch.c
2.sdk/sdk/gui/lv_watch/modem/mmi_modem_tcp/mmi_modem_tcp_net.c

index 3912254..3f94e58 100644 (file)
@@ -318,11 +318,18 @@ void option_key(struct _lv_obj_t * obj, lv_event_t event)
 
 #ifdef __MMI_ZHSX_SUPPORT__
 static bool s_is_ACT_ID_POWON_LOGO = false;
+static bool s_poweron_logo_is_finish = false;
 
 bool mmi_is_ACT_ID_POWON_LOGO(void)
 {
        return s_is_ACT_ID_POWON_LOGO;
 }
+
+bool mmi_poweron_logo_is_finish(void)
+{
+       return s_poweron_logo_is_finish;
+}
+
 #endif
 
 void watch_poweron_logo(void)
@@ -388,6 +395,8 @@ static void watch_poweron_logo_del(void)
 
 #ifdef __MMI_ZHSX_SUPPORT__
        s_is_ACT_ID_POWON_LOGO = false;
+
+       s_poweron_logo_is_finish = true;
 #endif
 }
 
index bd4d6ef..b1d509d 100644 (file)
@@ -54,13 +54,25 @@ void mmi_launcher_tcp_first_connect(uint32_t para)
                                uos_timer_create(&s_tcp_first_connect_timer_id);
                        }
                        uos_timer_stop(s_tcp_first_connect_timer_id);
-                       uos_timer_start(s_tcp_first_connect_timer_id, MS_TO_TICKS(MMI_TCP_FIRST_CONNECT_TIME_INTERVAL), 0, mmi_launcher_tcp_first_connect, NULL);
-                       s_tcp_first_connect_time += MMI_TCP_FIRST_CONNECT_TIME_INTERVAL;
+                       uos_timer_start(s_tcp_first_connect_timer_id, 
+                                                       MS_TO_TICKS(MMI_TCP_FIRST_CONNECT_TIME_INTERVAL), 
+                                                       MS_TO_TICKS(MMI_TCP_FIRST_CONNECT_TIME_INTERVAL),
+                                                       mmi_launcher_tcp_first_connect,
+                                                       NULL);
+                       if(true == mmi_poweron_logo_is_finish())
+                       {
+                               s_tcp_first_connect_time += MMI_TCP_FIRST_CONNECT_TIME_INTERVAL;
+                       }
                }
                else
                {
                        printf("[@CHENG_DEBUG][%s][%d]: \n",__FUNCTION__,__LINE__);
 
+                       if(true != mmi_poweron_logo_is_finish())
+                       {
+                               printf("[@CHENG_DEBUG][%s][%d]: \n",__FUNCTION__,__LINE__);
+                               return;
+                       }
                        if(NULL != s_tcp_first_connect_timer_id)
                        {
                                uos_timer_stop(s_tcp_first_connect_timer_id);
@@ -114,13 +126,25 @@ void mmi_watch_authenticate_pre(uint32_t para)
                                uos_timer_create(&s_authenticate_connect_timer_id);
                        }
                        uos_timer_stop(s_authenticate_connect_timer_id);
-                       uos_timer_start(s_authenticate_connect_timer_id, MS_TO_TICKS(MMI_AUTHENTICATE_CONNECT_TIME_INTERVAL), 0, mmi_watch_authenticate_pre, NULL);
-                       s_authenticate_connect_time += MMI_AUTHENTICATE_CONNECT_TIME_INTERVAL;
+                       uos_timer_start(s_authenticate_connect_timer_id, 
+                                                       MS_TO_TICKS(MMI_AUTHENTICATE_CONNECT_TIME_INTERVAL), 
+                                                       MS_TO_TICKS(MMI_AUTHENTICATE_CONNECT_TIME_INTERVAL), 
+                                                       mmi_watch_authenticate_pre, 
+                                                       NULL);
+                       if(true == mmi_poweron_logo_is_finish())
+                       {
+                               s_authenticate_connect_time += MMI_AUTHENTICATE_CONNECT_TIME_INTERVAL;
+                       }
                }
                else
                {
                        printf("[@CHENG_DEBUG][%s][%d]: \n",__FUNCTION__,__LINE__);
 
+                       if(true != mmi_poweron_logo_is_finish())
+                       {
+                               printf("[@CHENG_DEBUG][%s][%d]: \n",__FUNCTION__,__LINE__);
+                               return;
+                       }                       
                        if(NULL != s_authenticate_connect_timer_id)
                        {
                                uos_timer_stop(s_authenticate_connect_timer_id);