Merge branch 'pr/420' into 420

This commit is contained in:
RogueMaster
2022-11-19 01:58:17 -05:00
9 changed files with 135 additions and 43 deletions
+2 -1
View File
@@ -1031,7 +1031,8 @@ void nfc_worker_mf_ultralight_read_auth(NfcWorker* nfc_worker) {
if(furi_hal_nfc_detect(nfc_data, 300) && nfc_data->type == FuriHalNfcTypeA) {
if(mf_ul_check_card_type(nfc_data->atqa[0], nfc_data->atqa[1], nfc_data->sak)) {
nfc_worker->callback(NfcWorkerEventCardDetected, nfc_worker->context);
if(data->auth_method == MfUltralightAuthMethodManual) {
if(data->auth_method == MfUltralightAuthMethodManual ||
data->auth_method == MfUltralightAuthMethodAuto) {
nfc_worker->callback(NfcWorkerEventMfUltralightPassKey, nfc_worker->context);
key = nfc_util_bytes2num(data->auth_key, 4);
} else if(data->auth_method == MfUltralightAuthMethodAmeebo) {
-1
View File
@@ -68,7 +68,6 @@ typedef enum {
// Mifare Ultralight events
NfcWorkerEventMfUltralightPassKey, // NFC worker requesting manual key
NfcWorkerEventMfUltralightPwdAuth, // Reader sent auth command
} NfcWorkerEvent;
typedef bool (*NfcWorkerCallback)(NfcWorkerEvent event, void* context);
+1
View File
@@ -34,6 +34,7 @@ typedef enum {
MfUltralightAuthMethodManual,
MfUltralightAuthMethodAmeebo,
MfUltralightAuthMethodXiaomi,
MfUltralightAuthMethodAuto,
} MfUltralightAuthMethod;
// Important: order matters; some features are based on positioning in this enum