mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
NFC: bump API version and format FeliCa scene code
This commit is contained in:
@@ -48,7 +48,6 @@ ARRAY_DEF(MfClassicUserKeys, char*, M_PTR_OPLIST);
|
||||
#define NFC_TEXT_STORE_SIZE 128
|
||||
#define NFC_APP_FOLDER ANY_PATH("nfc")
|
||||
|
||||
|
||||
typedef struct {
|
||||
FuriStringStack_t strings;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ bool nfc_scene_felica_menu_on_event(void* context, SceneManagerEvent event) {
|
||||
consumed = true;
|
||||
} else
|
||||
*/
|
||||
if(event.event == SubmenuIndexInfo) {
|
||||
if(event.event == SubmenuIndexInfo) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneFelicaInfoSelect);
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ void nfc_scene_felica_read_success_on_enter(void* context) {
|
||||
temp_str = furi_string_alloc_printf("\e#%s", nfc_felica_type(felica_data->type));
|
||||
|
||||
FelicaSystemList_it_t it;
|
||||
for(FelicaSystemList_it(it, felica_data->systems); !FelicaSystemList_end_p(it); FelicaSystemList_next(it)) {
|
||||
for(FelicaSystemList_it(it, felica_data->systems); !FelicaSystemList_end_p(it);
|
||||
FelicaSystemList_next(it)) {
|
||||
FelicaSystem* current_system = *FelicaSystemList_ref(it);
|
||||
furi_string_cat_printf(
|
||||
temp_str, "\nSystem %04X (#%d):", current_system->code, current_system->number);
|
||||
|
||||
@@ -17,7 +17,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
if(block != NULL) {
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
} else {
|
||||
furi_string_cat_printf(nfc->text_box_store, "???? ");
|
||||
}
|
||||
@@ -31,7 +32,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
if(block != NULL) {
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
} else {
|
||||
furi_string_cat_printf(nfc->text_box_store, "???? ");
|
||||
}
|
||||
@@ -43,7 +45,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "MAC:\n");
|
||||
@@ -52,7 +55,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "ID:\n");
|
||||
@@ -61,7 +65,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "D_ID:\n");
|
||||
@@ -70,7 +75,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "CKV:\n");
|
||||
@@ -79,7 +85,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "MC:\n");
|
||||
@@ -88,7 +95,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "WCNT:\n");
|
||||
@@ -97,7 +105,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "MAC_A:\n");
|
||||
@@ -106,7 +115,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
|
||||
furi_string_cat_str(nfc->text_box_store, "CRC_CHECK:\n");
|
||||
@@ -115,7 +125,8 @@ void nfc_scene_felica_service_data_on_enter(void* context) {
|
||||
if(!(i % 8) && i) {
|
||||
furi_string_push_back(nfc->text_box_store, '\n');
|
||||
}
|
||||
furi_string_cat_printf(nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
furi_string_cat_printf(
|
||||
nfc->text_box_store, "%02X%02X ", block->data[i], block->data[i + 1]);
|
||||
}
|
||||
}
|
||||
text_box_set_text(text_box, furi_string_get_cstr(nfc->text_box_store));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,11.3,,
|
||||
Version,+,11.4,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
|
||||
|
@@ -418,8 +418,7 @@ bool felica_read_lite_system(
|
||||
area->end_service_code = 0x000f;
|
||||
FelicaNodeList_init(area->nodes);
|
||||
FelicaNode* node = malloc(sizeof(node));
|
||||
node->type = FelicaNodeTypeService,
|
||||
node->ptr.service = service;
|
||||
node->type = FelicaNodeTypeService, node->ptr.service = service;
|
||||
FelicaNodeList_push_back(area->nodes, node);
|
||||
|
||||
service->number = 0;
|
||||
@@ -575,7 +574,8 @@ bool felica_read_card(
|
||||
|
||||
void felica_service_clear(FelicaService* service) {
|
||||
FelicaBlockList_it_t it;
|
||||
for(FelicaBlockList_it(it, service->blocks); !FelicaBlockList_end_p(it); FelicaBlockList_next(it)) {
|
||||
for(FelicaBlockList_it(it, service->blocks); !FelicaBlockList_end_p(it);
|
||||
FelicaBlockList_next(it)) {
|
||||
FelicaBlock* block = *FelicaBlockList_ref(it);
|
||||
free(block);
|
||||
}
|
||||
@@ -586,7 +586,7 @@ void felica_area_clear(FelicaArea* area) {
|
||||
FelicaNodeList_it_t it;
|
||||
for(FelicaNodeList_it(it, area->nodes); !FelicaNodeList_end_p(it); FelicaNodeList_next(it)) {
|
||||
FelicaNode* node = *FelicaNodeList_ref(it);
|
||||
if (node->type == FelicaNodeTypeArea) {
|
||||
if(node->type == FelicaNodeTypeArea) {
|
||||
felica_area_clear(node->ptr.area);
|
||||
} else if(node->type == FelicaNodeTypeService) {
|
||||
felica_service_clear(node->ptr.service);
|
||||
@@ -598,7 +598,8 @@ void felica_area_clear(FelicaArea* area) {
|
||||
|
||||
void felica_clear(FelicaData* data) {
|
||||
FelicaSystemList_it_t it;
|
||||
for(FelicaSystemList_it(it, data->systems); !FelicaSystemList_end_p(it); FelicaSystemList_next(it)) {
|
||||
for(FelicaSystemList_it(it, data->systems); !FelicaSystemList_end_p(it);
|
||||
FelicaSystemList_next(it)) {
|
||||
FelicaSystem* system = *FelicaSystemList_ref(it);
|
||||
felica_area_clear(&system->root_area);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user