1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 15:46:14 +01:00

Update IO_DFPlayer.h

Ensure device goes off-line when not responding.
This commit is contained in:
Neil McKechnie 2023-03-31 16:50:18 +01:00
parent 6b535654f8
commit 6fbaca7930

View File

@ -231,8 +231,10 @@ protected:
// Poll device every second that other commands aren't being sent,
// to check if it's still connected and responding.
sendPacket(0x42);
_timeoutTime = currentMicros + 5000000UL; // Timeout if no response within 5 seconds
_awaitingResponse = true;
if (!_awaitingResponse) {
_timeoutTime = currentMicros + 5000000UL; // Timeout if no response within 5 seconds
_awaitingResponse = true;
}
}
}
}