mirror of
https://github.com/whowechina/aic_pico.git
synced 2024-11-27 23:10:48 +01:00
Filter out false card ids from faulty module
This commit is contained in:
parent
cae146ec96
commit
01b141db53
Binary file not shown.
@ -199,6 +199,15 @@ static void cardio_run()
|
||||
nfc_card_t card = nfc_detect_card();
|
||||
nfc_rf_field(false);
|
||||
|
||||
/* Double check ID, some module gives random false data */
|
||||
nfc_rf_field(true);
|
||||
nfc_card_t card_confirm = nfc_detect_card();
|
||||
nfc_rf_field(false);
|
||||
|
||||
if (memcmp(&card, &card_confirm, sizeof(card)) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (memcmp(&old_card, &card, sizeof(old_card)) == 0) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user