fix: 修复udp突发长度错误的问题,以及camera的i2c地址错误的问题

This commit is contained in:
2025-07-11 11:54:21 +08:00
parent 4a5709a783
commit 33a2dbf437
2 changed files with 7 additions and 5 deletions

View File

@@ -458,11 +458,13 @@ public class UDPClientPool
dataArray[(i * (256 * (32 / 8)))..] :
dataArray[(i * (256 * (32 / 8)))..((i + 1) * (256 * (32 / 8)))];
// Calculate BurstLength
opts.BurstLength = ((byte)(
sendDataArray.Length % 4 == 0 ?
(sendDataArray.Length / 4) :
(sendDataArray.Length / 4) + 1
(sendDataArray.Length / 4 - 1) :
(sendDataArray.Length / 4)
));
ret = await UDPClientPool.SendAddrPackAsync(endPoint, new SendAddrPackage(opts));
if (!ret) return new(new Exception("Send 1st address package failed!"));