From bda69f76500a4c22df3290d9e02c47b610bec1c9 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Thu, 8 Sep 2022 20:23:54 +0300 Subject: [PATCH] fix new lfrfid bugs --- applications/lfrfid/scenes/lfrfid_scene_extra_actions.c | 2 +- applications/lfrfid/scenes/lfrfid_scene_read_success.c | 7 +++++-- applications/lfrfid/scenes/lfrfid_scene_save_type.c | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/applications/lfrfid/scenes/lfrfid_scene_extra_actions.c b/applications/lfrfid/scenes/lfrfid_scene_extra_actions.c index 43e3de99e..58082cf10 100644 --- a/applications/lfrfid/scenes/lfrfid_scene_extra_actions.c +++ b/applications/lfrfid/scenes/lfrfid_scene_extra_actions.c @@ -18,7 +18,7 @@ void lfrfid_scene_extra_actions_on_enter(void* context) { submenu_add_item( submenu, - "Read ASK (Animal, Ordinary Card)", + "Read ASK (FDX,Regular)", SubmenuIndexASK, lfrfid_scene_extra_actions_submenu_callback, app); diff --git a/applications/lfrfid/scenes/lfrfid_scene_read_success.c b/applications/lfrfid/scenes/lfrfid_scene_read_success.c index 6761dcfe6..550878a8d 100644 --- a/applications/lfrfid/scenes/lfrfid_scene_read_success.c +++ b/applications/lfrfid/scenes/lfrfid_scene_read_success.c @@ -40,16 +40,19 @@ void lfrfid_scene_read_success_on_enter(void* context) { string_t render_data; string_init(render_data); protocol_dict_render_brief_data(app->dict, render_data, app->protocol_id); - string_cat_printf(tmp_string, "\r\n%s", string_get_cstr(render_data)); - string_clear(render_data); + //string_cat_printf(tmp_string, "\r\n%s", string_get_cstr(render_data)); widget_add_string_element( widget, 0, 16, AlignLeft, AlignTop, FontSecondary, string_get_cstr(tmp_string)); + widget_add_string_element( + widget, 0, 28, AlignLeft, AlignTop, FontSecondary, string_get_cstr(render_data)); + notification_message_block(app->notifications, &sequence_set_green_255); view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewWidget); string_clear(tmp_string); + string_clear(render_data); } bool lfrfid_scene_read_success_on_event(void* context, SceneManagerEvent event) { diff --git a/applications/lfrfid/scenes/lfrfid_scene_save_type.c b/applications/lfrfid/scenes/lfrfid_scene_save_type.c index 4c1116007..827e6d151 100644 --- a/applications/lfrfid/scenes/lfrfid_scene_save_type.c +++ b/applications/lfrfid/scenes/lfrfid_scene_save_type.c @@ -17,9 +17,10 @@ void lfrfid_scene_save_type_on_enter(void* context) { SaveTypeCtx* state = malloc(sizeof(SaveTypeCtx)); for(uint8_t i = 0; i < LFRFIDProtocolMax; i++) { - if(strcmp( - protocol_dict_get_manufacturer(app->dict, i), - protocol_dict_get_name(app->dict, i)) != 0) { + if((strcmp( + protocol_dict_get_manufacturer(app->dict, i), + protocol_dict_get_name(app->dict, i)) != 0) && + (strcmp(protocol_dict_get_manufacturer(app->dict, i), "N/A") != 0)) { string_init_printf( state->menu_item_name[i], "%s %s",