switched to Stopwatch for timers for more reliability

This commit is contained in:
nikzori
2025-03-06 10:18:06 +03:00
parent e00e96bea7
commit bcf0fb7a5c

View File

@@ -244,8 +244,9 @@ namespace Gidrolock_Modbus_Scanner
async Task<bool> PollEntry(Entry entry)
{
bool res = false;
Modbus.ReadRegAsync(modbusID, (FunctionCode)entry.registerType, entry.address, entry.length);
isAwaitingResponse = true;
Modbus.ReadRegAsync(modbusID, (FunctionCode)entry.registerType, entry.address, entry.length);
stopwatch.Restart();