diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index db347cf13..38eb2ecb6 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -2044,7 +2044,7 @@ bool GetIso14443aAnswerFromTag_Thinfilm(uint8_t *receivedResponse, uint8_t *rec } } - if (GetTickCount() - receive_timer > 100) + if (GetTickCountDelta(receive_timer) > 100) break; } *received_len = Demod.len; @@ -2094,7 +2094,7 @@ static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receive } // timeout already in ms + 100ms guard time - if (GetTickCount() - receive_timer > timeout + 100) + if (GetTickCountDelta(receive_timer) > timeout + 100) break; } return false; diff --git a/armsrc/mifaresim.c b/armsrc/mifaresim.c index 0f912c083..cdd8b556d 100644 --- a/armsrc/mifaresim.c +++ b/armsrc/mifaresim.c @@ -1106,7 +1106,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *datain, uint1 Dbprintf("[MFEMUL_AUTH1] AUTH COMPLETED for sector %d with key %c. time=%d", cardAUTHSC, cardAUTHKEY == 0 ? 'A' : 'B', - GetTickCount() - authTimer + GetTickCountDelta(authTimer) ); } LED_C_ON();