From 1ee8696e474a84839c602377e7225704c1e10dd3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 13 May 2020 00:36:52 +0200 Subject: [PATCH] Fix issue #729. Avoid stalling on non-rdv4 when polling for FeliCa without card in proximity --- armsrc/felica.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/felica.c b/armsrc/felica.c index 40536fa08..e72051bdc 100644 --- a/armsrc/felica.c +++ b/armsrc/felica.c @@ -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; }