add hot reset for remote update but no work

This commit is contained in:
2025-04-29 21:13:38 +08:00
parent 3f77a1a426
commit 210f6aa61c
4 changed files with 112 additions and 41 deletions

View File

@@ -354,7 +354,10 @@ public class UDPClientPool
return new(new Exception("Message bus not working!"));
opts.IsWrite = true;
var writeTimes = dataArray.Length / (256 * (32 / 8)) + 1;
var hasRest = dataArray.Length % (256 * (32 / 8)) != 0;
var writeTimes = hasRest ?
dataArray.Length / (256 * (32 / 8)) + 1 :
dataArray.Length / (256 * (32 / 8));
for (var i = 0; i < writeTimes; i++)
{
// Sperate Data Array