nfc: Move set default MFUL password

This way it can be edited if needed instead of reentered
This commit is contained in:
Yukai Li
2022-10-07 02:18:13 -06:00
parent 5aadfcd20a
commit b5859acf9c
2 changed files with 2 additions and 1 deletions

View File

@@ -9,7 +9,6 @@ void nfc_scene_mf_ultralight_key_input_byte_input_callback(void* context) {
void nfc_scene_mf_ultralight_key_input_on_enter(void* context) {
Nfc* nfc = context;
memset(nfc->byte_input_store, 0xFF, 4); // Default to 0xFFFFFFFF
// Setup view
ByteInput* byte_input = nfc->byte_input;
byte_input_set_header_text(byte_input, "Enter the password in hex");

View File

@@ -69,6 +69,8 @@ bool nfc_scene_read_on_event(void* context, SceneManagerEvent event) {
consumed = true;
} else if(event.event == NfcWorkerEventReadMfUltralight) {
notification_message(nfc->notifications, &sequence_success);
// Set unlock password input to 0xFFFFFFFF only on fresh read
memset(nfc->byte_input_store, 0xFF, 4);
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadSuccess);
consumed = true;
} else if(event.event == NfcWorkerEventReadMfClassicDone) {