NFC refactoring (#3050)

"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.

Starring:

- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer

Supporting roles:

- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance

Special thanks:

@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
This commit is contained in:
gornekich
2023-10-24 07:08:09 +04:00
committed by GitHub
parent 35c903494c
commit d92b0a82cc
514 changed files with 41488 additions and 68125 deletions

View File

@@ -1,28 +1,20 @@
#include "../nfc_i.h"
#include "nfc/nfc_device.h"
#include "../nfc_app_i.h"
void nfc_scene_file_select_on_enter(void* context) {
Nfc* nfc = context;
nfc_device_data_clear(&nfc->dev->dev_data);
NfcApp* instance = context;
// Process file_select return
nfc_device_set_loading_callback(nfc->dev, nfc_show_loading_popup, nfc);
if(!furi_string_size(nfc->dev->load_path)) {
furi_string_set_str(nfc->dev->load_path, NFC_APP_FOLDER);
}
if(nfc_file_select(nfc->dev)) {
scene_manager_set_scene_state(nfc->scene_manager, NfcSceneSavedMenu, 0);
scene_manager_next_scene(nfc->scene_manager, NfcSceneSavedMenu);
if(nfc_load_from_file_select(instance)) {
scene_manager_next_scene(instance->scene_manager, NfcSceneSavedMenu);
} else {
scene_manager_search_and_switch_to_previous_scene(nfc->scene_manager, NfcSceneStart);
scene_manager_previous_scene(instance->scene_manager);
}
nfc_device_set_loading_callback(nfc->dev, NULL, nfc);
}
bool nfc_scene_file_select_on_event(void* context, SceneManagerEvent event) {
UNUSED(context);
UNUSED(event);
return false;
bool consumed = false;
return consumed;
}
void nfc_scene_file_select_on_exit(void* context) {