|
@@ -7,13 +7,13 @@ void wifi_marauder_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, vo
|
|
|
// If text box store gets too big, then truncate it
|
|
// If text box store gets too big, then truncate it
|
|
|
app->text_box_store_strlen += len;
|
|
app->text_box_store_strlen += len;
|
|
|
if(app->text_box_store_strlen >= WIFI_MARAUDER_TEXT_BOX_STORE_SIZE - 1) {
|
|
if(app->text_box_store_strlen >= WIFI_MARAUDER_TEXT_BOX_STORE_SIZE - 1) {
|
|
|
- string_right(app->text_box_store, app->text_box_store_strlen / 2);
|
|
|
|
|
- app->text_box_store_strlen = string_size(app->text_box_store) + len;
|
|
|
|
|
|
|
+ furi_string_right(app->text_box_store, app->text_box_store_strlen / 2);
|
|
|
|
|
+ app->text_box_store_strlen = furi_string_size(app->text_box_store) + len;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Null-terminate buf and append to text box store
|
|
// Null-terminate buf and append to text box store
|
|
|
buf[len] = '\0';
|
|
buf[len] = '\0';
|
|
|
- string_cat_printf(app->text_box_store, "%s", buf);
|
|
|
|
|
|
|
+ furi_string_cat_printf(app->text_box_store, "%s", buf);
|
|
|
|
|
|
|
|
view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventRefreshConsoleOutput);
|
|
view_dispatcher_send_custom_event(app->view_dispatcher, WifiMarauderEventRefreshConsoleOutput);
|
|
|
}
|
|
}
|
|
@@ -30,24 +30,24 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
|
|
|
text_box_set_focus(text_box, TextBoxFocusEnd);
|
|
text_box_set_focus(text_box, TextBoxFocusEnd);
|
|
|
}
|
|
}
|
|
|
if(app->is_command) {
|
|
if(app->is_command) {
|
|
|
- string_reset(app->text_box_store);
|
|
|
|
|
|
|
+ furi_string_reset(app->text_box_store);
|
|
|
app->text_box_store_strlen = 0;
|
|
app->text_box_store_strlen = 0;
|
|
|
if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
|
if(0 == strncmp("help", app->selected_tx_string, strlen("help"))) {
|
|
|
const char* help_msg =
|
|
const char* help_msg =
|
|
|
"For app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n";
|
|
"For app support/feedback,\nreach out to me:\n@cococode#6011 (discord)\n0xchocolate (github)\n";
|
|
|
- string_cat_str(app->text_box_store, help_msg);
|
|
|
|
|
|
|
+ furi_string_cat_str(app->text_box_store, help_msg);
|
|
|
app->text_box_store_strlen += strlen(help_msg);
|
|
app->text_box_store_strlen += strlen(help_msg);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(app->show_stopscan_tip) {
|
|
if(app->show_stopscan_tip) {
|
|
|
const char* help_msg = "Press BACK to send stopscan\n";
|
|
const char* help_msg = "Press BACK to send stopscan\n";
|
|
|
- string_cat_str(app->text_box_store, help_msg);
|
|
|
|
|
|
|
+ furi_string_cat_str(app->text_box_store, help_msg);
|
|
|
app->text_box_store_strlen += strlen(help_msg);
|
|
app->text_box_store_strlen += strlen(help_msg);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Set starting text - for "View Log", this will just be what was already in the text box store
|
|
// Set starting text - for "View Log", this will just be what was already in the text box store
|
|
|
- text_box_set_text(app->text_box, string_get_cstr(app->text_box_store));
|
|
|
|
|
|
|
+ text_box_set_text(app->text_box, furi_string_get_cstr(app->text_box_store));
|
|
|
|
|
|
|
|
scene_manager_set_scene_state(app->scene_manager, WifiMarauderSceneConsoleOutput, 0);
|
|
scene_manager_set_scene_state(app->scene_manager, WifiMarauderSceneConsoleOutput, 0);
|
|
|
view_dispatcher_switch_to_view(app->view_dispatcher, WifiMarauderAppViewConsoleOutput);
|
|
view_dispatcher_switch_to_view(app->view_dispatcher, WifiMarauderAppViewConsoleOutput);
|
|
@@ -70,7 +70,7 @@ bool wifi_marauder_scene_console_output_on_event(void* context, SceneManagerEven
|
|
|
bool consumed = false;
|
|
bool consumed = false;
|
|
|
|
|
|
|
|
if(event.type == SceneManagerEventTypeCustom) {
|
|
if(event.type == SceneManagerEventTypeCustom) {
|
|
|
- text_box_set_text(app->text_box, string_get_cstr(app->text_box_store));
|
|
|
|
|
|
|
+ text_box_set_text(app->text_box, furi_string_get_cstr(app->text_box_store));
|
|
|
consumed = true;
|
|
consumed = true;
|
|
|
} else if(event.type == SceneManagerEventTypeTick) {
|
|
} else if(event.type == SceneManagerEventTypeTick) {
|
|
|
consumed = true;
|
|
consumed = true;
|