修改4Gota升级判断条件 1454/4
authorhcj <1224667075@qq.com>
Sat, 23 Nov 2024 10:40:38 +0000 (18:40 +0800)
committerhcj <1224667075@qq.com>
Sat, 23 Nov 2024 10:40:38 +0000 (18:40 +0800)
code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp

index 539c5b9..a3a8b9a 100644 (file)
@@ -248,9 +248,9 @@ static uint8_t g_time_synced = 0;
 static uint8_t g_time_sync_retry_time = 0;
 
 
-static uint8_t need_py_srv_ver_txt = 0;
+static uint8_t PY_SRV_VER_CURRENT = 0;
 
-#define  PY_SRV_VER_CURRENT  15
+// #define  PY_SRV_VER_CURRENT  15
 
 
 #define  PY_SRV_VER_SUPORT_PY_OTA_MINI_VER 13
@@ -769,14 +769,19 @@ static int decodeNetStat(char* msg)
             int read_size=fread(read_buf,1,32,fp);
             if(read_size)
             {
-                need_py_srv_ver_txt=atoi(read_buf);
-                printf("need_py_srv_ver_txt : %d\r\n",need_py_srv_ver_txt);
+                PY_SRV_VER_CURRENT=atoi(read_buf);
+                printf("need_py_srv_ver_txt : %d\r\n",PY_SRV_VER_CURRENT);
             }
             fclose(fp);
         }
+        else
+        {
+            PY_SRV_VER_CURRENT=0;
+
+        }
     
         
-        if (g_py_ver >= PY_SRV_VER_SUPORT_PY_OTA_MINI_VER && ((g_py_ver < PY_SRV_VER_CURRENT ) || g_py_ver<need_py_srv_ver_txt)) 
+        if (g_py_ver >= PY_SRV_VER_SUPORT_PY_OTA_MINI_VER &&  g_py_ver<PY_SRV_VER_CURRENT )
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"start cat1 python ota\n");
             Cat1_OTA(CAT1_TCP_START_OTA);