diff --git a/lib/nfc/protocols/slix.c b/lib/nfc/protocols/slix.c index ca3ebcd67..d8befc399 100644 --- a/lib/nfc/protocols/slix.c +++ b/lib/nfc/protocols/slix.c @@ -6,12 +6,16 @@ #include #include "furi_hal_nfc.h" +uint8_t slix_get_ti(FuriHalNfcDevData* nfc_data) { + return (nfc_data->uid[3] >> 3) & 3; +} + bool slix_check_card_type(FuriHalNfcDevData* nfc_data) { if((nfc_data->uid[0] == 0xE0) && (nfc_data->uid[1] == 0x04) && (nfc_data->uid[2] == 0x01) - && (((nfc_data->uid[3] >> 4) & 3) == 2)) { + && slix_get_ti(nfc_data) == 2) { return true; } return false; @@ -21,7 +25,7 @@ bool slix2_check_card_type(FuriHalNfcDevData* nfc_data) { if((nfc_data->uid[0] == 0xE0) && (nfc_data->uid[1] == 0x04) && (nfc_data->uid[2] == 0x01) - && (((nfc_data->uid[3] >> 4) & 3) == 1)) { + && slix_get_ti(nfc_data) == 1) { return true; } return false;