fixed unnecessary delay between polls
This commit is contained in:
@@ -239,7 +239,7 @@ namespace Gidrolock_Modbus_Scanner
|
|||||||
bool res = false;
|
bool res = false;
|
||||||
Modbus.ReadRegAsync(modbusID, (FunctionCode)entry.registerType, entry.address, entry.length);
|
Modbus.ReadRegAsync(modbusID, (FunctionCode)entry.registerType, entry.address, entry.length);
|
||||||
isAwaitingResponse = true;
|
isAwaitingResponse = true;
|
||||||
await Task.Delay(2000).ContinueWith(_ =>
|
Task.Delay(2000).ContinueWith(_ =>
|
||||||
{
|
{
|
||||||
if (isAwaitingResponse)
|
if (isAwaitingResponse)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user