Skip to content

Commit

Permalink
Removed debug logging and moving skip into free mem function
Browse files Browse the repository at this point in the history
  • Loading branch information
Demae committed Jan 1, 2025
1 parent f53a92d commit 8a00874
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/nfc/protocols/mf_desfire/mf_desfire_poller.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ static NfcCommand mf_desfire_poller_handler_read_version(MfDesfirePoller* instan
instance->error = mf_desfire_poller_read_version(instance, &instance->data->version);
if(instance->error == MfDesfireErrorNone) {
FURI_LOG_D(TAG, "Read version success");
FURI_LOG_D(
TAG, "%d.%d", instance->data->version.hw_major, instance->data->version.sw_major);
if(instance->data->version.hw_major == 0) { //pre-EV1 desfire cards
instance->state = MfDesfirePollerStateReadMasterKeySettings;
} else {
instance->state = MfDesfirePollerStateReadFreeMemory;
}
instance->state = MfDesfirePollerStateReadFreeMemory;
} else {
FURI_LOG_E(TAG, "Failed to read version");
iso14443_4a_poller_halt(instance->iso14443_4a_poller);
Expand All @@ -83,6 +77,11 @@ static NfcCommand mf_desfire_poller_handler_read_version(MfDesfirePoller* instan
static NfcCommand mf_desfire_poller_handler_read_free_memory(MfDesfirePoller* instance) {
NfcCommand command = NfcCommandContinue;

if(instance->data->version.hw_major == 0x00 && instance->data->version.hw_minor == 0x02) {
instance->state = MfDesfirePollerStateReadMasterKeySettings;
return command;
}

instance->error = mf_desfire_poller_read_free_memory(instance, &instance->data->free_memory);
if(instance->error == MfDesfireErrorNone) {
FURI_LOG_D(TAG, "Read free memory success");
Expand Down

0 comments on commit 8a00874

Please sign in to comment.