added line break polling

This commit is contained in:
nikzori
2025-04-02 12:40:39 +03:00
parent 3d4a97b4e9
commit 8587ad9d3d
8 changed files with 42 additions and 10 deletions

View File

@@ -194,6 +194,20 @@ namespace Gidrolock_Modbus_Scanner
}
}
if (device.wiredLineBreak != null || device.wiredLineBreak.Count > 0)
{
for (int i = 0; i < device.wiredLineBreak.Count; i++)
{
res = await PollEntry(device.wiredLineBreak[i]);
if (res)
{
bool value = latestMessage.Data[0] > 0x00 ? true : false;
WiredSensor snsr = sensorPanel.Controls[i] as WiredSensor;
snsr.labelBreak.Text = value ? "Обрыв!" : "ОК";
}
}
}
res = await PollEntry(device.sensorAlarm);
if (res)
{