mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-02 03:02:28 +03:00
revert old nfc debug defines was used to save space
This commit is contained in:
parent
07f6859a80
commit
f70d2b5ae7
@ -53,18 +53,14 @@ ADD_SCENE(nfc, mf_classic_update_success, MfClassicUpdateSuccess)
|
||||
ADD_SCENE(nfc, mf_classic_wrong_card, MfClassicWrongCard)
|
||||
ADD_SCENE(nfc, emv_read_success, EmvReadSuccess)
|
||||
ADD_SCENE(nfc, emv_menu, EmvMenu)
|
||||
#if FURI_DEBUG
|
||||
ADD_SCENE(nfc, emulate_apdu_sequence, EmulateApduSequence)
|
||||
#endif
|
||||
ADD_SCENE(nfc, device_info, DeviceInfo)
|
||||
ADD_SCENE(nfc, delete, Delete)
|
||||
ADD_SCENE(nfc, delete_success, DeleteSuccess)
|
||||
ADD_SCENE(nfc, restore_original_confirm, RestoreOriginalConfirm)
|
||||
ADD_SCENE(nfc, restore_original, RestoreOriginal)
|
||||
#if FURI_DEBUG
|
||||
ADD_SCENE(nfc, debug, Debug)
|
||||
ADD_SCENE(nfc, field, Field)
|
||||
#endif
|
||||
ADD_SCENE(nfc, dict_not_found, DictNotFound)
|
||||
ADD_SCENE(nfc, rpc, Rpc)
|
||||
ADD_SCENE(nfc, exit_confirm, ExitConfirm)
|
||||
|
@ -1,4 +1,3 @@
|
||||
#if FURI_DEBUG
|
||||
#include "../nfc_i.h"
|
||||
|
||||
enum SubmenuDebugIndex {
|
||||
@ -53,4 +52,3 @@ void nfc_scene_debug_on_exit(void* context) {
|
||||
|
||||
submenu_reset(nfc->submenu);
|
||||
}
|
||||
#endif
|
@ -1,4 +1,3 @@
|
||||
#if FURI_DEBUG
|
||||
#include "../nfc_i.h"
|
||||
#include <core/common_defines.h>
|
||||
|
||||
@ -33,4 +32,3 @@ void nfc_scene_emulate_apdu_sequence_on_exit(void* context) {
|
||||
|
||||
nfc_blink_stop(nfc);
|
||||
}
|
||||
#endif
|
@ -1,4 +1,3 @@
|
||||
#if FURI_DEBUG
|
||||
#include "../nfc_i.h"
|
||||
|
||||
void nfc_scene_field_on_enter(void* context) {
|
||||
@ -32,4 +31,3 @@ void nfc_scene_field_on_exit(void* context) {
|
||||
notification_internal_message(nfc->notifications, &sequence_reset_blue);
|
||||
popup_reset(nfc->popup);
|
||||
}
|
||||
#endif
|
@ -8,9 +8,7 @@ enum SubmenuIndex {
|
||||
SubmenuIndexSaved,
|
||||
SubmenuIndexExtraAction,
|
||||
SubmenuIndexAddManually,
|
||||
#if FURI_DEBUG
|
||||
SubmenuIndexDebug,
|
||||
#endif
|
||||
};
|
||||
|
||||
void nfc_scene_start_submenu_callback(void* context, uint32_t index) {
|
||||
@ -31,12 +29,12 @@ void nfc_scene_start_on_enter(void* context) {
|
||||
submenu, "Extra Actions", SubmenuIndexExtraAction, nfc_scene_start_submenu_callback, nfc);
|
||||
submenu_add_item(
|
||||
submenu, "Add Manually", SubmenuIndexAddManually, nfc_scene_start_submenu_callback, nfc);
|
||||
#if FURI_DEBUG
|
||||
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
|
||||
submenu_add_item(
|
||||
submenu, "Debug", SubmenuIndexDebug, nfc_scene_start_submenu_callback, nfc);
|
||||
}
|
||||
#endif
|
||||
|
||||
submenu_set_selected_item(
|
||||
submenu, scene_manager_get_scene_state(nfc->scene_manager, NfcSceneStart));
|
||||
|
||||
@ -84,14 +82,11 @@ bool nfc_scene_start_on_event(void* context, SceneManagerEvent event) {
|
||||
nfc->scene_manager, NfcSceneStart, SubmenuIndexAddManually);
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneSetType);
|
||||
consumed = true;
|
||||
}
|
||||
#if FURI_DEBUG
|
||||
else if(event.event == SubmenuIndexDebug) {
|
||||
} else if(event.event == SubmenuIndexDebug) {
|
||||
scene_manager_set_scene_state(nfc->scene_manager, NfcSceneStart, SubmenuIndexDebug);
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneDebug);
|
||||
consumed = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
@ -95,13 +95,9 @@ int32_t nfc_worker_task(void* context) {
|
||||
}
|
||||
} else if(nfc_worker->state == NfcWorkerStateUidEmulate) {
|
||||
nfc_worker_emulate_uid(nfc_worker);
|
||||
}
|
||||
#if FURI_DEBUG
|
||||
else if(nfc_worker->state == NfcWorkerStateEmulateApdu) {
|
||||
} else if(nfc_worker->state == NfcWorkerStateEmulateApdu) {
|
||||
nfc_worker_emulate_apdu(nfc_worker);
|
||||
}
|
||||
#endif
|
||||
else if(nfc_worker->state == NfcWorkerStateMfUltralightEmulate) {
|
||||
} else if(nfc_worker->state == NfcWorkerStateMfUltralightEmulate) {
|
||||
nfc_worker_emulate_mf_ultralight(nfc_worker);
|
||||
} else if(nfc_worker->state == NfcWorkerStateMfClassicEmulate) {
|
||||
nfc_worker_emulate_mf_classic(nfc_worker);
|
||||
@ -755,7 +751,7 @@ void nfc_worker_emulate_uid(NfcWorker* nfc_worker) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if FURI_DEBUG
|
||||
|
||||
void nfc_worker_emulate_apdu(NfcWorker* nfc_worker) {
|
||||
FuriHalNfcTxRxContext tx_rx = {};
|
||||
FuriHalNfcDevData params = {
|
||||
@ -788,7 +784,6 @@ void nfc_worker_emulate_apdu(NfcWorker* nfc_worker) {
|
||||
reader_analyzer_stop(nfc_worker->reader_analyzer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void nfc_worker_mf_ultralight_auth_received_callback(MfUltralightAuth auth, void* context) {
|
||||
furi_assert(context);
|
||||
|
@ -44,7 +44,7 @@ const PDOLValue* const pdol_values[] = {
|
||||
&pdol_transaction_cert,
|
||||
&pdol_unpredict_number,
|
||||
};
|
||||
#if FURI_DEBUG
|
||||
|
||||
static const uint8_t select_ppse_ans[] = {0x6F, 0x29, 0x84, 0x0E, 0x32, 0x50, 0x41, 0x59, 0x2E,
|
||||
0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31,
|
||||
0xA5, 0x17, 0xBF, 0x0C, 0x14, 0x61, 0x12, 0x4F, 0x07,
|
||||
@ -61,7 +61,7 @@ static const uint8_t pdol_ans[] = {0x77, 0x40, 0x82, 0x02, 0x20, 0x00, 0x57, 0x1
|
||||
0x00, 0x9F, 0x26, 0x08, 0x7A, 0x65, 0x7F, 0xD3, 0x52, 0x96,
|
||||
0xC9, 0x85, 0x9F, 0x27, 0x01, 0x00, 0x9F, 0x36, 0x02, 0x06,
|
||||
0x0C, 0x9F, 0x6C, 0x02, 0x10, 0x00, 0x90, 0x00};
|
||||
#endif
|
||||
|
||||
static void emv_trace(FuriHalNfcTxRxContext* tx_rx, const char* message) {
|
||||
if(furi_log_get_level() == FuriLogLevelTrace) {
|
||||
FURI_LOG_T(TAG, "%s", message);
|
||||
@ -409,7 +409,6 @@ bool emv_read_bank_card(FuriHalNfcTxRxContext* tx_rx, EmvApplication* emv_app) {
|
||||
return card_num_read;
|
||||
}
|
||||
|
||||
#if FURI_DEBUG
|
||||
bool emv_card_emulation(FuriHalNfcTxRxContext* tx_rx) {
|
||||
furi_assert(tx_rx);
|
||||
bool emulation_complete = false;
|
||||
@ -443,4 +442,3 @@ bool emv_card_emulation(FuriHalNfcTxRxContext* tx_rx) {
|
||||
|
||||
return emulation_complete;
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user