|
@@ -2869,8 +2869,9 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteErrorLog("Received Nothing.");
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
int TryCount = 3;
|
|
|
- if ( reallyLength <= 2 )
|
|
|
+ while ( reallyLength <= 2 )
|
|
|
{
|
|
|
if (TryCount < 0)
|
|
|
{
|
|
@@ -2882,7 +2883,8 @@ namespace MOKA_Factory_Tools
|
|
|
reallyLength += len;
|
|
|
TryCount--;
|
|
|
}
|
|
|
- Log.WriteInfoLog("数据" + SerialInit.ByteToHex(receive2Data.Take(reallyLength).ToArray()));
|
|
|
+ Log.WriteInfoLog("接收的数据2:" + SerialInit.ByteToHex(receive2Data.Take(reallyLength).ToArray()));
|
|
|
+
|
|
|
//CRC校验
|
|
|
byte crcHighByte = receive2Data[reallyLength - 2];
|
|
|
byte crcLowByte = receive2Data[reallyLength - 1];
|