cat1升级条件判断修改 1454/3
authorhcj <1224667075@qq.com>
Sat, 23 Nov 2024 09:29:17 +0000 (17:29 +0800)
committerhcj <1224667075@qq.com>
Sat, 23 Nov 2024 09:29:17 +0000 (17:29 +0800)
code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp

index 4599a85..539c5b9 100644 (file)
@@ -250,7 +250,7 @@ static uint8_t g_time_sync_retry_time = 0;
 
 static uint8_t need_py_srv_ver_txt = 0;
 
-#define  PY_SRV_VER_CURRENT  16
+#define  PY_SRV_VER_CURRENT  15
 
 
 #define  PY_SRV_VER_SUPORT_PY_OTA_MINI_VER 13
@@ -770,12 +770,13 @@ static int decodeNetStat(char* msg)
             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);
             }
             fclose(fp);
         }
     
         
-        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 ) || g_py_ver<need_py_srv_ver_txt)) 
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"start cat1 python ota\n");
             Cat1_OTA(CAT1_TCP_START_OTA);
@@ -827,7 +828,7 @@ void cat1_call_hungup(void)
 
 void cat1_call_answer(void)
 {
-    #if PY_SRV_VER_CURRENT >=16
+    // #if PY_SRV_VER_CURRENT >=16
    if(g_py_ver>=16)
     {
         if(osTimerIsRunning(g_timer_time_answer)==0  )
@@ -836,7 +837,7 @@ void cat1_call_answer(void)
             WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 g_timer_time_answer timer ret %d\n",ret);
         }
     }
-    #endif
+    // #endif
 
     udp_send_msg_toCat1(UDP_CMD_ANSWER,"0");
 }
@@ -851,7 +852,7 @@ void cat1_call_dial(char* phonenum)
     bool volte = OHOS::ConfigModel::GetInstance()->GetVoLTE_Call();
     if (volte == true){
          WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"cat1_call_dial %s\n",phonenum);
-        #if PY_SRV_VER_CURRENT >=16
+        // #if PY_SRV_VER_CURRENT >=16
         if(g_py_ver>=16)
         {
             if(osTimerIsRunning(g_timer_time_Dial)==0  )
@@ -861,7 +862,7 @@ void cat1_call_dial(char* phonenum)
             }
         }
           
-        #endif
+        // #endif
 
         udp_send_msg_toCat1(UDP_CMD_DIAL_NUMB,phonenum);
     }