ソースを参照

增加了读的时候FE字段的判断

chenjiangqun 2 年 前
コミット
55d8974c24
1 ファイル変更7 行追加1 行削除
  1. 7 1
      FactoryTool_CShare/IO/SerialCMD.cs

+ 7 - 1
FactoryTool_CShare/IO/SerialCMD.cs

@@ -2874,8 +2874,14 @@ namespace MOKA_Factory_Tools
                         }                           
                         else
                         {
-                            int mark1= Comport.ReadByte();
+                            int mark1= Comport.ReadByte();                    
                             result[6] = (byte)mark1;
+                            if (result[6]!=0xFE)
+                            {                           
+                                Log.WriteInfoLog("返回错误,返回的第二段串口值不正确");
+                                return false;
+                            }
+
                             int k1 = Comport.ReadByte();
                             int k2 = Comport.ReadByte();
                             result[7] = (byte)k1;