fix new lfrfid bugs

This commit is contained in:
MX 2022-09-08 20:23:54 +03:00
parent 5e03086d7b
commit bda69f7650
No known key found for this signature in database
GPG key ID: 6C4C311DFD4B4AB5
3 changed files with 10 additions and 6 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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(
if((strcmp(
protocol_dict_get_manufacturer(app->dict, i),
protocol_dict_get_name(app->dict, i)) != 0) {
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",