mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 04:08:35 -07:00
Merge branch 'UNLEASHED' into 420
This commit is contained in:
@@ -288,8 +288,6 @@ int32_t nfc_app(void* p) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightEmulate);
|
||||
} else if(nfc->dev->format == NfcDeviceSaveFormatMifareClassic) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicEmulate);
|
||||
} else if(nfc->dev->format == NfcDeviceSaveFormatBankCard) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneDeviceInfo);
|
||||
} else {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "../nfc_i.h"
|
||||
|
||||
enum SubmenuIndex {
|
||||
SubmenuIndexSave,
|
||||
SubmenuIndexInfo,
|
||||
};
|
||||
|
||||
@@ -14,6 +15,7 @@ void nfc_scene_emv_menu_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
Submenu* submenu = nfc->submenu;
|
||||
|
||||
submenu_add_item(submenu, "Save", SubmenuIndexSave, nfc_scene_emv_menu_submenu_callback, nfc);
|
||||
submenu_add_item(submenu, "Info", SubmenuIndexInfo, nfc_scene_emv_menu_submenu_callback, nfc);
|
||||
submenu_set_selected_item(
|
||||
nfc->submenu, scene_manager_get_scene_state(nfc->scene_manager, NfcSceneEmvMenu));
|
||||
@@ -26,7 +28,13 @@ bool nfc_scene_emv_menu_on_event(void* context, SceneManagerEvent event) {
|
||||
bool consumed = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubmenuIndexInfo) {
|
||||
if(event.event == SubmenuIndexSave) {
|
||||
nfc->dev->format = NfcDeviceSaveFormatBankCard;
|
||||
// Clear device name
|
||||
nfc_device_set_name(nfc->dev, "");
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneSaveName);
|
||||
consumed = true;
|
||||
} else if(event.event == SubmenuIndexInfo) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo);
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ void nfc_scene_saved_menu_on_enter(void* context) {
|
||||
Submenu* submenu = nfc->submenu;
|
||||
|
||||
if(nfc->dev->format == NfcDeviceSaveFormatUid ||
|
||||
nfc->dev->format == NfcDeviceSaveFormatMifareDesfire) {
|
||||
nfc->dev->format == NfcDeviceSaveFormatMifareDesfire ||
|
||||
nfc->dev->format == NfcDeviceSaveFormatBankCard) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Emulate UID",
|
||||
|
||||
Reference in New Issue
Block a user