This commit is contained in:
Pawel Spychalski (DzikuVx)
2017-10-22 20:14:28 +02:00
parent 08b16b4cea
commit 0a1b5feecd
3 changed files with 14 additions and 0 deletions

View File

@@ -307,6 +307,16 @@ void loop(void)
uint32_t currentMillis = millis();
bool transmitPayload = false;
/*
* Watchdog for frame decoding stuck somewhere in the middle of a process
*/
if (
qsp.protocolState != QSP_STATE_IDLE &&
abs(millis() - qsp.frameDecodingStartedAt) > QSP_MAX_FRAME_DECODE_TIME
) {
qsp.protocolState = QSP_STATE_IDLE;
}
if (
qsp.forcePongFrame &&
!transmitPayload &&