Skip to content

Commit 7cc725e

Browse files
committed
💩
1 parent 020c839 commit 7cc725e

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

Modules/Wu.CommTool.Modules.ModbusRtu/Models/MrtuData.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public partial class MrtuData : ObservableObject
2626
/// 寄存器地址 起始地址 单位:word
2727
/// </summary>
2828
[ObservableProperty]
29-
private int registerAddr;
29+
private ushort registerAddr;
3030

31-
/// 寄存器地址16进制
32-
/// </summary>
33-
[ObservableProperty]
34-
private int registerAddrHex;
31+
///// 寄存器地址16进制
32+
///// </summary>
33+
//[ObservableProperty]
34+
//private ushort registerAddrHex;
3535

3636
/// <summary>
3737
/// 寄存器地址 最后一个地址 单位:word

Modules/Wu.CommTool.Modules.ModbusRtu/Models/MrtuDevice.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,15 @@ public void UpdateState()
229229
var onlineCount = MrtuDatas.Where(x => x.State == true).Count();
230230
if (onlineCount == MrtuDatas.Count)
231231
{
232-
DeviceState = DeviceState.Online;
232+
DeviceState = DeviceState.Online;//全部在线
233233
}
234234
else if (onlineCount == 0)
235235
{
236-
DeviceState = DeviceState.Offline;
236+
DeviceState = DeviceState.Offline;//全部离线
237237
}
238238
else if (onlineCount < MrtuDatas.Count)
239239
{
240-
DeviceState = DeviceState.Warning;//警告 存在通讯失败的测点
240+
DeviceState = DeviceState.Warning;//存在离线的测点
241241
}
242-
243242
}
244243
}

Modules/Wu.CommTool.Modules.ModbusRtu/Models/MrtuSerialPort.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ private void ReceiveFrame()
544544
}
545545
}
546546

547-
//TODO Dispose
548547
public void Dispose()
549548
{
550549

0 commit comments

Comments
 (0)