This commit is contained in:
Diego
2025-05-28 10:47:31 +08:00
parent 926eced724
commit be6f662549
4 changed files with 6 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<PluginVersion>10.6.28</PluginVersion>
<ProPluginVersion>10.6.28</ProPluginVersion>
<PluginVersion>10.6.29</PluginVersion>
<ProPluginVersion>10.6.29</ProPluginVersion>
<AuthenticationVersion>2.1.8</AuthenticationVersion>
</PropertyGroup>

View File

@@ -61,14 +61,14 @@ internal sealed class HeartbeatAndReceivePlugin : PluginBase, ITcpConnectedPlugi
{
return;//此处可判断,如果为服务器,则不用使用心跳。
}
if (HeartbeatTime > 0)
SendHeartbeat = true;
HeartbeatTime = Math.Max(HeartbeatTime, 1000);
if (DtuId.IsNullOrWhiteSpace()) return;
if (client is ITcpClient tcpClient)
{
SendHeartbeat = true;
await tcpClient.SendAsync(DtuIdByte).ConfigureAwait(false);
if (Task == null)

View File

@@ -51,7 +51,7 @@ public class PackHelper
// 获取变量的位偏移量
//if (item.DataType == DataTypeEnum.Boolean)
item.Index = device.GetBitOffsetDefault(address);
if (item.DataType == DataTypeEnum.Byte)
if (item.DataType == DataTypeEnum.Byte&& !(item.ArrayLength>1))
item.Index += (item.Index % 2 == 0) ? 1 : -1;
}

View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>10.6.28</Version>
<Version>10.6.29</Version>
</PropertyGroup>
<ItemGroup>