feat: 增加了摄像头硬件复位和唤醒逻辑
This commit is contained in:
@@ -437,8 +437,11 @@ public class UDPClientPool
|
||||
int outstanding = sentCount - (found.HasValue ? found.Value : 0);
|
||||
|
||||
// If outstanding >= 512, wait for some data to be received
|
||||
if (outstanding >= 512)
|
||||
if (outstanding >= 512){
|
||||
logger.Debug($"Outstanding data packets: {outstanding}, waiting for more data to be received...");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Send next address package
|
||||
var ret = await UDPClientPool.SendAddrPackAsync(endPoint, new SendAddrPackage(optsList[sentCount]));
|
||||
@@ -475,9 +478,9 @@ public class UDPClientPool
|
||||
{
|
||||
var bytes = udpDatas[i].Data;
|
||||
var expectedLen = ((optsList[i].BurstLength + 1) * 4);
|
||||
if (bytes.Length != expectedLen)
|
||||
return new(new Exception($"Expected {expectedLen} bytes but received {bytes.Length} bytes at segment {i}"));
|
||||
resultData.AddRange(bytes);
|
||||
if ((bytes.Length - 4) != expectedLen)
|
||||
return new(new Exception($"Expected {expectedLen} bytes but received {bytes.Length - 4} bytes at segment {i}"));
|
||||
resultData.AddRange(bytes[4..]); // Skip the first 4 bytes (header)
|
||||
}
|
||||
|
||||
// Validate total data length
|
||||
|
||||
Reference in New Issue
Block a user