From: pwpiwi Date: Mon, 11 Dec 2017 19:40:09 +0000 (+0100) Subject: fix iso14a_set_timeout() adjustment X-Git-Tag: v3.1.0~107^2 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/fa85b08504eda7045b4b7d50fee1b75c4f5e5dd2?hp=7c7327e7c89c3640c5f23330ea5263829cea8b6f fix iso14a_set_timeout() adjustment --- diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 0a9f7c03..94ca52f5 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -189,13 +189,14 @@ void iso14a_set_trigger(bool enable) { void iso14a_set_timeout(uint32_t timeout) { - iso14a_timeout = timeout - (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER)/(16*8) + 2; + // adjust timeout by FPGA delays and 2 additional ssp_frames to detect SOF + iso14a_timeout = timeout + (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER)/(16*8) + 2; if(MF_DBGLEVEL >= 3) Dbprintf("ISO14443A Timeout set to %ld (%dms)", timeout, timeout / 106); } uint32_t iso14a_get_timeout(void) { - return iso14a_timeout + (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER)/(16*8) - 2; + return iso14a_timeout - (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER)/(16*8) - 2; } //-----------------------------------------------------------------------------