Просмотр исходного кода

修复高空和1.0版本匹配问题

zhunk 1 год назад
Родитель
Сommit
e58063bbd1
1 измененных файлов с 12 добавлено и 13 удалено
  1. 12 13
      Application_CBD/applications/hmi.c

+ 12 - 13
Application_CBD/applications/hmi.c

@@ -1223,14 +1223,14 @@ static void HMI_Decode(void)
 
         }
     }
-    //1.0
-    else if (strstr(rx_buffer,"SwversionV1")!=NULL)
+    //高空
+    else if (strstr(rx_buffer,"SwversionV11")!=NULL)
     {
-        if(device_status.version_type != 1)
+        device_status.dtype = 3;
+        if(device_status.version_type != 11)
         {
-            device_status.dtype = 3;
-            device_status.version_type = 1;
-            sprintf(device_status.driver, "%s",VERSION_ZP);
+            device_status.version_type = 11;
+            sprintf(device_status.driver, "%s",VERSION_GK);
             ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type));        //版本类型
             ef_set_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype));        //版本类型
             MA_save();
@@ -1239,14 +1239,14 @@ static void HMI_Decode(void)
 
         }
     }
-    //高空
-    else if (strstr(rx_buffer,"SwversionV11")!=NULL)
+    //1.0
+    else if (strstr(rx_buffer,"SwversionV1")!=NULL)
     {
-        device_status.dtype = 3;
-        if(device_status.version_type != 11)
+        if(device_status.version_type != 1)
         {
-            device_status.version_type = 11;
-            sprintf(device_status.driver, "%s",VERSION_GK);
+            device_status.dtype = 3;
+            device_status.version_type = 1;
+            sprintf(device_status.driver, "%s",VERSION_ZP);
             ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type));        //版本类型
             ef_set_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype));        //版本类型
             MA_save();
@@ -1255,7 +1255,6 @@ static void HMI_Decode(void)
 
         }
     }
-
     //低端款
     else if (strstr(rx_buffer,"SwversionV42")!=NULL) {
         device_status.dtype = 3;