From eb353056dc47f5c6a301d77aa5927b5cbe24ac66 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 01:34:29 +0200 Subject: [PATCH] fix super --- armsrc/mifarecmd.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 97e4bf42c..d57bae7cf 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2277,6 +2277,16 @@ void MifareCIdent(void) { ReaderTransmit(rats, sizeof(rats), NULL); res = ReaderReceive(buf, par); if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) { + + // super card ident + uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10}; + ReaderTransmit(super, sizeof(super), NULL); + res = ReaderReceive(buf, par); + if (res == 22) { + isGen = MAGIC_SUPER; + goto OUT; + } + isGen = MAGIC_GEN_2; goto OUT; } @@ -2308,15 +2318,8 @@ void MifareCIdent(void) { isGen = MAGIC_GEN_2; goto OUT; } - - // super card ident - uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10}; - ReaderTransmit(super, sizeof(super), NULL); - res = ReaderReceive(buf, par); - if (res == 22) { - isGen = MAGIC_SUPER; - goto OUT; - } + + }; OUT: