Fix issue #729. Avoid stalling on non-rdv4 when polling for FeliCa without card in proximity

This commit is contained in:
Philippe Teuwen 2020-05-13 00:36:52 +02:00
commit 1ee8696e47

View file

@ -431,7 +431,7 @@ bool WaitForFelicaReply(uint16_t maxbytes) {
);
if (DBGLEVEL >= DBG_DEBUG) Dbprintf("All bytes received! STATE_FULL");
return true;
} else if (c++ > timeout && FelicaFrame.state == STATE_UNSYNCD) {
} else if (c++ > timeout && (FelicaFrame.state == STATE_UNSYNCD || FelicaFrame.state == STATE_TRYING_SYNC)) {
if (DBGLEVEL >= DBG_DEBUG) Dbprintf("Error: Timeout! STATE_UNSYNCD");
return false;
}