M*LIB: non-inlined strings, FuriString primitive (#1795)
* Quicksave 1 * Header stage complete * Source stage complete * Lint & merge fixes * Includes * Documentation step 1 * FBT: output free size considering BT STACK * Documentation step 2 * py lint * Fix music player plugin * unit test stage 1: string allocator, mem, getters, setters, appends, compare, search. * unit test: string equality * unit test: string replace * unit test: string start_with, end_with * unit test: string trim * unit test: utf-8 * Rename * Revert fw_size changes * Simplify CLI backspace handling * Simplify CLI character insert * Merge fixes * Furi: correct filenaming and spelling * Bt: remove furi string include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -4,31 +4,31 @@ void lfrfid_scene_delete_confirm_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Widget* widget = app->widget;
|
||||
|
||||
string_t tmp_string;
|
||||
string_init(tmp_string);
|
||||
FuriString* tmp_string;
|
||||
tmp_string = furi_string_alloc();
|
||||
|
||||
widget_add_button_element(widget, GuiButtonTypeLeft, "Back", lfrfid_widget_callback, app);
|
||||
widget_add_button_element(widget, GuiButtonTypeRight, "Delete", lfrfid_widget_callback, app);
|
||||
|
||||
string_printf(tmp_string, "Delete %s?", string_get_cstr(app->file_name));
|
||||
furi_string_printf(tmp_string, "Delete %s?", furi_string_get_cstr(app->file_name));
|
||||
widget_add_string_element(
|
||||
widget, 64, 0, AlignCenter, AlignTop, FontPrimary, string_get_cstr(tmp_string));
|
||||
widget, 64, 0, AlignCenter, AlignTop, FontPrimary, furi_string_get_cstr(tmp_string));
|
||||
|
||||
string_reset(tmp_string);
|
||||
furi_string_reset(tmp_string);
|
||||
size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id);
|
||||
uint8_t* data = (uint8_t*)malloc(size);
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, data, size);
|
||||
for(uint8_t i = 0; i < MIN(size, (size_t)8); i++) {
|
||||
if(i != 0) {
|
||||
string_cat_printf(tmp_string, " ");
|
||||
furi_string_cat_printf(tmp_string, " ");
|
||||
}
|
||||
|
||||
string_cat_printf(tmp_string, "%02X", data[i]);
|
||||
furi_string_cat_printf(tmp_string, "%02X", data[i]);
|
||||
}
|
||||
free(data);
|
||||
|
||||
widget_add_string_element(
|
||||
widget, 64, 19, AlignCenter, AlignTop, FontSecondary, string_get_cstr(tmp_string));
|
||||
widget, 64, 19, AlignCenter, AlignTop, FontSecondary, furi_string_get_cstr(tmp_string));
|
||||
widget_add_string_element(
|
||||
widget,
|
||||
64,
|
||||
@@ -39,7 +39,7 @@ void lfrfid_scene_delete_confirm_on_enter(void* context) {
|
||||
protocol_dict_get_name(app->dict, app->protocol_id));
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewWidget);
|
||||
string_clear(tmp_string);
|
||||
furi_string_free(tmp_string);
|
||||
}
|
||||
|
||||
bool lfrfid_scene_delete_confirm_on_event(void* context, SceneManagerEvent event) {
|
||||
|
@@ -8,8 +8,8 @@ void lfrfid_scene_emulate_on_enter(void* context) {
|
||||
DOLPHIN_DEED(DolphinDeedRfidEmulate);
|
||||
|
||||
popup_set_header(popup, "Emulating", 89, 30, AlignCenter, AlignTop);
|
||||
if(!string_empty_p(app->file_name)) {
|
||||
popup_set_text(popup, string_get_cstr(app->file_name), 89, 43, AlignCenter, AlignTop);
|
||||
if(!furi_string_empty(app->file_name)) {
|
||||
popup_set_text(popup, furi_string_get_cstr(app->file_name), 89, 43, AlignCenter, AlignTop);
|
||||
} else {
|
||||
popup_set_text(
|
||||
popup,
|
||||
|
@@ -42,7 +42,7 @@ void lfrfid_scene_extra_actions_on_enter(void* context) {
|
||||
submenu, scene_manager_get_scene_state(app->scene_manager, LfRfidSceneExtraActions));
|
||||
|
||||
// clear key
|
||||
string_reset(app->file_name);
|
||||
furi_string_reset(app->file_name);
|
||||
app->protocol_id = PROTOCOL_NO;
|
||||
app->read_type = LFRFIDWorkerReadTypeAuto;
|
||||
|
||||
|
@@ -4,8 +4,8 @@ void lfrfid_scene_raw_info_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Widget* widget = app->widget;
|
||||
|
||||
// string_t tmp_string;
|
||||
// string_init(tmp_string);
|
||||
// FuriString* tmp_string;
|
||||
// tmp_string = furi_string_alloc();
|
||||
|
||||
bool sd_exist = storage_sd_status(app->storage) == FSE_OK;
|
||||
if(!sd_exist) {
|
||||
|
@@ -4,9 +4,9 @@ void lfrfid_scene_raw_name_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
TextInput* text_input = app->text_input;
|
||||
|
||||
const char* key_name = string_get_cstr(app->raw_file_name);
|
||||
const char* key_name = furi_string_get_cstr(app->raw_file_name);
|
||||
|
||||
bool key_name_is_empty = string_empty_p(app->file_name);
|
||||
bool key_name_is_empty = furi_string_empty(app->file_name);
|
||||
if(key_name_is_empty) {
|
||||
lfrfid_text_store_set(app, "RfidRecord");
|
||||
} else {
|
||||
@@ -38,7 +38,7 @@ bool lfrfid_scene_raw_name_on_event(void* context, SceneManagerEvent event) {
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == LfRfidEventNext) {
|
||||
consumed = true;
|
||||
string_set_str(app->raw_file_name, app->text_store);
|
||||
furi_string_set(app->raw_file_name, app->text_store);
|
||||
scene_manager_next_scene(scene_manager, LfRfidSceneRawInfo);
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#define RAW_READ_TIME 5000
|
||||
|
||||
typedef struct {
|
||||
string_t string_file_name;
|
||||
FuriString* string_file_name;
|
||||
FuriTimer* timer;
|
||||
bool is_psk;
|
||||
bool error;
|
||||
@@ -31,7 +31,7 @@ void lfrfid_scene_raw_read_on_enter(void* context) {
|
||||
|
||||
LfRfidReadRawState* state = malloc(sizeof(LfRfidReadRawState));
|
||||
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneRawRead, (uint32_t)state);
|
||||
string_init(state->string_file_name);
|
||||
state->string_file_name = furi_string_alloc();
|
||||
|
||||
popup_set_icon(popup, 0, 3, &I_RFIDDolphinReceive_97x61);
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);
|
||||
@@ -40,16 +40,16 @@ void lfrfid_scene_raw_read_on_enter(void* context) {
|
||||
|
||||
state->timer = furi_timer_alloc(timer_callback, FuriTimerTypeOnce, app);
|
||||
furi_timer_start(state->timer, RAW_READ_TIME);
|
||||
string_printf(
|
||||
furi_string_printf(
|
||||
state->string_file_name,
|
||||
"%s/%s%s",
|
||||
LFRFID_SD_FOLDER,
|
||||
string_get_cstr(app->raw_file_name),
|
||||
furi_string_get_cstr(app->raw_file_name),
|
||||
LFRFID_APP_RAW_ASK_EXTENSION);
|
||||
popup_set_header(popup, "Reading\nRAW RFID\nASK", 89, 30, AlignCenter, AlignTop);
|
||||
lfrfid_worker_read_raw_start(
|
||||
app->lfworker,
|
||||
string_get_cstr(state->string_file_name),
|
||||
furi_string_get_cstr(state->string_file_name),
|
||||
LFRFIDWorkerReadTypeASKOnly,
|
||||
lfrfid_read_callback,
|
||||
app);
|
||||
@@ -88,15 +88,15 @@ bool lfrfid_scene_raw_read_on_event(void* context, SceneManagerEvent event) {
|
||||
popup, "Reading\nRAW RFID\nPSK", 89, 30, AlignCenter, AlignTop);
|
||||
notification_message(app->notifications, &sequence_blink_start_yellow);
|
||||
lfrfid_worker_stop(app->lfworker);
|
||||
string_printf(
|
||||
furi_string_printf(
|
||||
state->string_file_name,
|
||||
"%s/%s%s",
|
||||
LFRFID_SD_FOLDER,
|
||||
string_get_cstr(app->raw_file_name),
|
||||
furi_string_get_cstr(app->raw_file_name),
|
||||
LFRFID_APP_RAW_PSK_EXTENSION);
|
||||
lfrfid_worker_read_raw_start(
|
||||
app->lfworker,
|
||||
string_get_cstr(state->string_file_name),
|
||||
furi_string_get_cstr(state->string_file_name),
|
||||
LFRFIDWorkerReadTypePSKOnly,
|
||||
lfrfid_read_callback,
|
||||
app);
|
||||
@@ -121,6 +121,6 @@ void lfrfid_scene_raw_read_on_exit(void* context) {
|
||||
lfrfid_worker_stop_thread(app->lfworker);
|
||||
furi_timer_free(state->timer);
|
||||
|
||||
string_clear(state->string_file_name);
|
||||
furi_string_free(state->string_file_name);
|
||||
free(state);
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ bool lfrfid_scene_read_on_event(void* context, SceneManagerEvent event) {
|
||||
app->protocol_id = app->protocol_id_next;
|
||||
DOLPHIN_DEED(DolphinDeedRfidReadSuccess);
|
||||
notification_message(app->notifications, &sequence_success);
|
||||
string_reset(app->file_name);
|
||||
furi_string_reset(app->file_name);
|
||||
scene_manager_next_scene(app->scene_manager, LfRfidSceneReadSuccess);
|
||||
consumed = true;
|
||||
} else if(event.event == LfRfidEventReadStartPSK) {
|
||||
|
@@ -38,7 +38,7 @@ bool lfrfid_scene_read_key_menu_on_event(void* context, SceneManagerEvent event)
|
||||
scene_manager_next_scene(app->scene_manager, LfRfidSceneWrite);
|
||||
consumed = true;
|
||||
} else if(event.event == SubmenuIndexSave) {
|
||||
string_reset(app->file_name);
|
||||
furi_string_reset(app->file_name);
|
||||
scene_manager_next_scene(app->scene_manager, LfRfidSceneSaveName);
|
||||
consumed = true;
|
||||
} else if(event.event == SubmenuIndexEmulate) {
|
||||
|
@@ -4,51 +4,51 @@ void lfrfid_scene_read_success_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Widget* widget = app->widget;
|
||||
|
||||
string_t tmp_string;
|
||||
string_init(tmp_string);
|
||||
FuriString* tmp_string;
|
||||
tmp_string = furi_string_alloc();
|
||||
|
||||
widget_add_button_element(widget, GuiButtonTypeLeft, "Retry", lfrfid_widget_callback, app);
|
||||
widget_add_button_element(widget, GuiButtonTypeRight, "More", lfrfid_widget_callback, app);
|
||||
|
||||
string_printf(
|
||||
furi_string_printf(
|
||||
tmp_string,
|
||||
"%s[%s]",
|
||||
protocol_dict_get_name(app->dict, app->protocol_id),
|
||||
protocol_dict_get_manufacturer(app->dict, app->protocol_id));
|
||||
|
||||
widget_add_string_element(
|
||||
widget, 0, 2, AlignLeft, AlignTop, FontPrimary, string_get_cstr(tmp_string));
|
||||
widget, 0, 2, AlignLeft, AlignTop, FontPrimary, furi_string_get_cstr(tmp_string));
|
||||
|
||||
string_reset(tmp_string);
|
||||
furi_string_reset(tmp_string);
|
||||
size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id);
|
||||
uint8_t* data = (uint8_t*)malloc(size);
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, data, size);
|
||||
for(uint8_t i = 0; i < size; i++) {
|
||||
if(i >= 9) {
|
||||
string_cat_printf(tmp_string, "..");
|
||||
furi_string_cat_printf(tmp_string, "..");
|
||||
break;
|
||||
} else {
|
||||
if(i != 0) {
|
||||
string_cat_printf(tmp_string, " ");
|
||||
furi_string_cat_printf(tmp_string, " ");
|
||||
}
|
||||
string_cat_printf(tmp_string, "%02X", data[i]);
|
||||
furi_string_cat_printf(tmp_string, "%02X", data[i]);
|
||||
}
|
||||
}
|
||||
free(data);
|
||||
|
||||
string_t render_data;
|
||||
string_init(render_data);
|
||||
FuriString* render_data;
|
||||
render_data = furi_string_alloc();
|
||||
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);
|
||||
furi_string_cat_printf(tmp_string, "\r\n%s", furi_string_get_cstr(render_data));
|
||||
furi_string_free(render_data);
|
||||
|
||||
widget_add_string_multiline_element(
|
||||
widget, 0, 16, AlignLeft, AlignTop, FontSecondary, string_get_cstr(tmp_string));
|
||||
widget, 0, 16, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(tmp_string));
|
||||
|
||||
notification_message_block(app->notifications, &sequence_set_green_255);
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewWidget);
|
||||
string_clear(tmp_string);
|
||||
furi_string_free(tmp_string);
|
||||
}
|
||||
|
||||
bool lfrfid_scene_read_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
@@ -34,13 +34,14 @@ bool lfrfid_scene_rpc_on_event(void* context, SceneManagerEvent event) {
|
||||
const char* arg = rpc_system_app_get_data(app->rpc_ctx);
|
||||
bool result = false;
|
||||
if(arg && (app->rpc_state == LfRfidRpcStateIdle)) {
|
||||
string_set_str(app->file_path, arg);
|
||||
furi_string_set(app->file_path, arg);
|
||||
if(lfrfid_load_key_data(app, app->file_path, false)) {
|
||||
lfrfid_worker_start_thread(app->lfworker);
|
||||
lfrfid_worker_emulate_start(app->lfworker, (LFRFIDProtocol)app->protocol_id);
|
||||
app->rpc_state = LfRfidRpcStateEmulating;
|
||||
|
||||
lfrfid_text_store_set(app, "emulating\n%s", string_get_cstr(app->file_name));
|
||||
lfrfid_text_store_set(
|
||||
app, "emulating\n%s", furi_string_get_cstr(app->file_name));
|
||||
popup_set_text(popup, app->text_store, 89, 44, AlignCenter, AlignTop);
|
||||
|
||||
notification_message(app->notifications, &sequence_blink_start_magenta);
|
||||
|
@@ -1,21 +1,20 @@
|
||||
#include "m-string.h"
|
||||
#include <lib/toolbox/random_name.h>
|
||||
#include "../lfrfid_i.h"
|
||||
|
||||
void lfrfid_scene_save_name_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
TextInput* text_input = app->text_input;
|
||||
string_t folder_path;
|
||||
string_init(folder_path);
|
||||
FuriString* folder_path;
|
||||
folder_path = furi_string_alloc();
|
||||
|
||||
bool key_name_is_empty = string_empty_p(app->file_name);
|
||||
bool key_name_is_empty = furi_string_empty(app->file_name);
|
||||
if(key_name_is_empty) {
|
||||
string_set_str(app->file_path, LFRFID_APP_FOLDER);
|
||||
furi_string_set(app->file_path, LFRFID_APP_FOLDER);
|
||||
set_random_name(app->text_store, LFRFID_TEXT_STORE_SIZE);
|
||||
string_set_str(folder_path, LFRFID_APP_FOLDER);
|
||||
furi_string_set(folder_path, LFRFID_APP_FOLDER);
|
||||
} else {
|
||||
lfrfid_text_store_set(app, "%s", string_get_cstr(app->file_name));
|
||||
path_extract_dirname(string_get_cstr(app->file_path), folder_path);
|
||||
lfrfid_text_store_set(app, "%s", furi_string_get_cstr(app->file_name));
|
||||
path_extract_dirname(furi_string_get_cstr(app->file_path), folder_path);
|
||||
}
|
||||
|
||||
text_input_set_header_text(text_input, "Name the card");
|
||||
@@ -27,13 +26,15 @@ void lfrfid_scene_save_name_on_enter(void* context) {
|
||||
LFRFID_KEY_NAME_SIZE,
|
||||
key_name_is_empty);
|
||||
|
||||
FURI_LOG_I("", "%s %s", string_get_cstr(folder_path), app->text_store);
|
||||
FURI_LOG_I("", "%s %s", furi_string_get_cstr(folder_path), app->text_store);
|
||||
|
||||
ValidatorIsFile* validator_is_file = validator_is_file_alloc_init(
|
||||
string_get_cstr(folder_path), LFRFID_APP_EXTENSION, string_get_cstr(app->file_name));
|
||||
furi_string_get_cstr(folder_path),
|
||||
LFRFID_APP_EXTENSION,
|
||||
furi_string_get_cstr(app->file_name));
|
||||
text_input_set_validator(text_input, validator_is_file_callback, validator_is_file);
|
||||
|
||||
string_clear(folder_path);
|
||||
furi_string_free(folder_path);
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewTextInput);
|
||||
}
|
||||
@@ -46,11 +47,11 @@ bool lfrfid_scene_save_name_on_event(void* context, SceneManagerEvent event) {
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == LfRfidEventNext) {
|
||||
consumed = true;
|
||||
if(!string_empty_p(app->file_name)) {
|
||||
if(!furi_string_empty(app->file_name)) {
|
||||
lfrfid_delete_key(app);
|
||||
}
|
||||
|
||||
string_set_str(app->file_name, app->text_store);
|
||||
furi_string_set(app->file_name, app->text_store);
|
||||
|
||||
if(lfrfid_save_key(app)) {
|
||||
scene_manager_next_scene(scene_manager, LfRfidSceneSaveSuccess);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "../lfrfid_i.h"
|
||||
|
||||
typedef struct {
|
||||
string_t menu_item_name[LFRFIDProtocolMax];
|
||||
FuriString* menu_item_name[LFRFIDProtocolMax];
|
||||
uint32_t line_sel;
|
||||
} SaveTypeCtx;
|
||||
|
||||
@@ -20,18 +20,17 @@ void lfrfid_scene_save_type_on_enter(void* context) {
|
||||
if(strcmp(
|
||||
protocol_dict_get_manufacturer(app->dict, i),
|
||||
protocol_dict_get_name(app->dict, i)) != 0) {
|
||||
string_init_printf(
|
||||
state->menu_item_name[i],
|
||||
state->menu_item_name[i] = furi_string_alloc_printf(
|
||||
"%s %s",
|
||||
protocol_dict_get_manufacturer(app->dict, i),
|
||||
protocol_dict_get_name(app->dict, i));
|
||||
} else {
|
||||
string_init_printf(
|
||||
state->menu_item_name[i], "%s", protocol_dict_get_name(app->dict, i));
|
||||
state->menu_item_name[i] =
|
||||
furi_string_alloc_printf("%s", protocol_dict_get_name(app->dict, i));
|
||||
}
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
string_get_cstr(state->menu_item_name[i]),
|
||||
furi_string_get_cstr(state->menu_item_name[i]),
|
||||
i,
|
||||
lfrfid_scene_save_type_submenu_callback,
|
||||
app);
|
||||
@@ -43,7 +42,7 @@ void lfrfid_scene_save_type_on_enter(void* context) {
|
||||
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneSaveType, (uint32_t)state);
|
||||
|
||||
// clear key name
|
||||
string_reset(app->file_name);
|
||||
furi_string_reset(app->file_name);
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewSubmenu);
|
||||
}
|
||||
@@ -75,7 +74,7 @@ void lfrfid_scene_save_type_on_exit(void* context) {
|
||||
submenu_reset(app->submenu);
|
||||
|
||||
for(uint8_t i = 0; i < LFRFIDProtocolMax; i++) {
|
||||
string_clear(state->menu_item_name[i]);
|
||||
furi_string_free(state->menu_item_name[i]);
|
||||
}
|
||||
|
||||
uint32_t line_sel = state->line_sel;
|
||||
|
@@ -4,13 +4,13 @@ void lfrfid_scene_saved_info_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Widget* widget = app->widget;
|
||||
|
||||
string_t tmp_string;
|
||||
string_init(tmp_string);
|
||||
FuriString* tmp_string;
|
||||
tmp_string = furi_string_alloc();
|
||||
|
||||
string_printf(
|
||||
furi_string_printf(
|
||||
tmp_string,
|
||||
"%s [%s]\r\n",
|
||||
string_get_cstr(app->file_name),
|
||||
furi_string_get_cstr(app->file_name),
|
||||
protocol_dict_get_name(app->dict, app->protocol_id));
|
||||
|
||||
size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id);
|
||||
@@ -18,24 +18,24 @@ void lfrfid_scene_saved_info_on_enter(void* context) {
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, data, size);
|
||||
for(uint8_t i = 0; i < size; i++) {
|
||||
if(i != 0) {
|
||||
string_cat_printf(tmp_string, " ");
|
||||
furi_string_cat_printf(tmp_string, " ");
|
||||
}
|
||||
|
||||
string_cat_printf(tmp_string, "%02X", data[i]);
|
||||
furi_string_cat_printf(tmp_string, "%02X", data[i]);
|
||||
}
|
||||
free(data);
|
||||
|
||||
string_t render_data;
|
||||
string_init(render_data);
|
||||
FuriString* render_data;
|
||||
render_data = furi_string_alloc();
|
||||
protocol_dict_render_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);
|
||||
furi_string_cat_printf(tmp_string, "\r\n%s", furi_string_get_cstr(render_data));
|
||||
furi_string_free(render_data);
|
||||
|
||||
widget_add_string_multiline_element(
|
||||
widget, 0, 1, AlignLeft, AlignTop, FontSecondary, string_get_cstr(tmp_string));
|
||||
widget, 0, 1, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(tmp_string));
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewWidget);
|
||||
string_clear(tmp_string);
|
||||
furi_string_free(tmp_string);
|
||||
}
|
||||
|
||||
bool lfrfid_scene_saved_info_on_event(void* context, SceneManagerEvent event) {
|
||||
|
@@ -33,7 +33,7 @@ void lfrfid_scene_start_on_enter(void* context) {
|
||||
submenu, scene_manager_get_scene_state(app->scene_manager, LfRfidSceneStart));
|
||||
|
||||
// clear key
|
||||
string_reset(app->file_name);
|
||||
furi_string_reset(app->file_name);
|
||||
app->protocol_id = PROTOCOL_NO;
|
||||
app->read_type = LFRFIDWorkerReadTypeAuto;
|
||||
|
||||
@@ -49,7 +49,7 @@ bool lfrfid_scene_start_on_event(void* context, SceneManagerEvent event) {
|
||||
scene_manager_next_scene(app->scene_manager, LfRfidSceneRead);
|
||||
consumed = true;
|
||||
} else if(event.event == SubmenuIndexSaved) {
|
||||
string_set_str(app->file_path, LFRFID_APP_FOLDER);
|
||||
furi_string_set(app->file_path, LFRFID_APP_FOLDER);
|
||||
scene_manager_next_scene(app->scene_manager, LfRfidSceneSelectKey);
|
||||
consumed = true;
|
||||
} else if(event.event == SubmenuIndexAddManually) {
|
||||
|
@@ -22,8 +22,8 @@ void lfrfid_scene_write_on_enter(void* context) {
|
||||
Popup* popup = app->popup;
|
||||
|
||||
popup_set_header(popup, "Writing", 89, 30, AlignCenter, AlignTop);
|
||||
if(!string_empty_p(app->file_name)) {
|
||||
popup_set_text(popup, string_get_cstr(app->file_name), 89, 43, AlignCenter, AlignTop);
|
||||
if(!furi_string_empty(app->file_name)) {
|
||||
popup_set_text(popup, furi_string_get_cstr(app->file_name), 89, 43, AlignCenter, AlignTop);
|
||||
} else {
|
||||
popup_set_text(
|
||||
popup,
|
||||
|
Reference in New Issue
Block a user