From 8edf0e1c1a8ba71c99d2a9bf40329dbfb12f4e99 Mon Sep 17 00:00:00 2001 From: Torsten Stauder Date: Tue, 6 Jul 2021 08:37:53 +0200 Subject: [PATCH] Finally fixing single "no card"-events for PN5180 --- src/RfidPn5180.cpp | 8 ++++++-- src/main.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/RfidPn5180.cpp b/src/RfidPn5180.cpp index b57f654..4264155 100644 --- a/src/RfidPn5180.cpp +++ b/src/RfidPn5180.cpp @@ -87,11 +87,13 @@ extern unsigned long Rfid_LastRfidCheckTimestamp; // Reset to dummy-value if no card is there // Necessary to differentiate between "card is still applied" and "card is re-applied again after removal" // lastTimeDetected14443 is used to prevent "new card detection with old card" with single events where no card was detected - if (!lastTimeDetected14443 || (millis() - lastTimeDetected14443 >= 300)) { + if (!lastTimeDetected14443 || (millis() - lastTimeDetected14443 >= 400)) { lastTimeDetected14443 = 0; for (uint8_t i=0; i= 300)) { + if (!lastTimeDetected15693 || (millis() - lastTimeDetected15693 >= 400)) { lastTimeDetected15693 = 0; for (uint8_t i=0; i