Ver Fonte

Add SettingsInit widget, get view/scene logic down + ./fbt format

0xchocolate há 2 anos atrás
pai
commit
bf287ad6a1

+ 1 - 0
applications/external/wifi_marauder_companion/scenes/wifi_marauder_scene_config.h

@@ -1,3 +1,4 @@
 ADD_SCENE(wifi_marauder, start, Start)
 ADD_SCENE(wifi_marauder, start, Start)
 ADD_SCENE(wifi_marauder, console_output, ConsoleOutput)
 ADD_SCENE(wifi_marauder, console_output, ConsoleOutput)
 ADD_SCENE(wifi_marauder, text_input, TextInput)
 ADD_SCENE(wifi_marauder, text_input, TextInput)
+ADD_SCENE(wifi_marauder, settings_init, SettingsInit)

+ 10 - 10
applications/external/wifi_marauder_companion/scenes/wifi_marauder_scene_console_output.c

@@ -3,7 +3,7 @@
 void wifi_marauder_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, void* context) {
 void wifi_marauder_console_output_handle_rx_data_cb(uint8_t* buf, size_t len, void* context) {
     furi_assert(context);
     furi_assert(context);
     WifiMarauderApp* app = context;
     WifiMarauderApp* app = context;
-    
+
     // 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) {
@@ -22,14 +22,14 @@ void wifi_marauder_console_output_handle_rx_packets_cb(uint8_t* buf, size_t len,
     WifiMarauderApp* app = context;
     WifiMarauderApp* app = context;
 
 
     // If it is a sniff function, open the pcap file for recording
     // If it is a sniff function, open the pcap file for recording
-    if (strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0 && !app->is_writing) {
+    if(strncmp("sniff", app->selected_tx_string, strlen("sniff")) == 0 && !app->is_writing) {
         app->is_writing = true;
         app->is_writing = true;
-        if (!app->capture_file || !storage_file_is_open(app->capture_file)) {
+        if(!app->capture_file || !storage_file_is_open(app->capture_file)) {
             wifi_marauder_create_pcap_file(app);
             wifi_marauder_create_pcap_file(app);
         }
         }
     }
     }
 
 
-    if (app->is_writing) {
+    if(app->is_writing) {
         storage_file_write(app->capture_file, buf, len);
         storage_file_write(app->capture_file, buf, len);
     }
     }
 }
 }
@@ -49,8 +49,7 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
         furi_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 =
-                "Marauder companion " WIFI_MARAUDER_APP_VERSION "\n";
+            const char* help_msg = "Marauder companion " WIFI_MARAUDER_APP_VERSION "\n";
             furi_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);
         }
         }
@@ -73,9 +72,11 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
 
 
     // Register callback to receive data
     // Register callback to receive data
     wifi_marauder_uart_set_handle_rx_data_cb(
     wifi_marauder_uart_set_handle_rx_data_cb(
-        app->uart, wifi_marauder_console_output_handle_rx_data_cb); // setup callback for general log rx thread
+        app->uart,
+        wifi_marauder_console_output_handle_rx_data_cb); // setup callback for general log rx thread
     wifi_marauder_uart_set_handle_rx_data_cb(
     wifi_marauder_uart_set_handle_rx_data_cb(
-        app->lp_uart, wifi_marauder_console_output_handle_rx_packets_cb); // setup callback for packets rx thread
+        app->lp_uart,
+        wifi_marauder_console_output_handle_rx_packets_cb); // setup callback for packets rx thread
 
 
     // Send command with newline '\n'
     // Send command with newline '\n'
     if(app->is_command && app->selected_tx_string) {
     if(app->is_command && app->selected_tx_string) {
@@ -113,8 +114,7 @@ void wifi_marauder_scene_console_output_on_exit(void* context) {
     }
     }
 
 
     app->is_writing = false;
     app->is_writing = false;
-    if (app->capture_file && storage_file_is_open(app->capture_file)) {
+    if(app->capture_file && storage_file_is_open(app->capture_file)) {
         storage_file_close(app->capture_file);
         storage_file_close(app->capture_file);
     }
     }
-
 }
 }

+ 52 - 0
applications/external/wifi_marauder_companion/scenes/wifi_marauder_scene_settings_init.c

@@ -0,0 +1,52 @@
+#include "../wifi_marauder_app_i.h"
+
+void wifi_marauder_scene_settings_init_widget_callback(
+    GuiButtonType result,
+    InputType type,
+    void* context) {
+    WifiMarauderApp* app = context;
+    if(type == InputTypeShort) {
+        view_dispatcher_send_custom_event(app->view_dispatcher, result);
+    }
+}
+
+void wifi_marauder_scene_settings_init_on_enter(void* context) {
+    WifiMarauderApp* app = context;
+    Widget* widget = app->widget;
+
+    widget_add_button_element(
+        widget, GuiButtonTypeLeft, "No", wifi_marauder_scene_settings_init_widget_callback, app);
+    widget_add_button_element(
+        widget, GuiButtonTypeRight, "Yes", wifi_marauder_scene_settings_init_widget_callback, app);
+
+    widget_add_string_element(app->widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "Save pcaps?");
+    widget_add_text_scroll_element(
+        app->widget,
+        0,
+        12,
+        128,
+        38,
+        "With compatible marauder\nfirmware, you can choose to\nsave captures (pcaps) to the\nflipper sd card here:\n/" MARAUDER_APP_FOLDER_USER
+        "\n\nYou can change this setting in the app at any time. Would\nyou like to enable this feature now?");
+
+    view_dispatcher_switch_to_view(app->view_dispatcher, WifiMarauderAppViewWidget);
+}
+
+bool wifi_marauder_scene_settings_init_on_event(void* context, SceneManagerEvent event) {
+    WifiMarauderApp* app = context;
+    bool consumed = false;
+
+    if(event.type == SceneManagerEventTypeCustom) {
+        // go back to start scene (main menu)
+        app->need_to_prompt_settings_init = false;
+        scene_manager_previous_scene(app->scene_manager);
+        consumed = true;
+    }
+
+    return consumed;
+}
+
+void wifi_marauder_scene_settings_init_on_exit(void* context) {
+    WifiMarauderApp* app = context;
+    widget_reset(app->widget);
+}

+ 36 - 3
applications/external/wifi_marauder_companion/scenes/wifi_marauder_scene_start.c

@@ -26,7 +26,13 @@ typedef struct {
 // NUM_MENU_ITEMS defined in wifi_marauder_app_i.h - if you add an entry here, increment it!
 // NUM_MENU_ITEMS defined in wifi_marauder_app_i.h - if you add an entry here, increment it!
 const WifiMarauderItem items[NUM_MENU_ITEMS] = {
 const WifiMarauderItem items[NUM_MENU_ITEMS] = {
     {"View Log from", {"start", "end"}, 2, {"", ""}, NO_ARGS, FOCUS_CONSOLE_TOGGLE, NO_TIP},
     {"View Log from", {"start", "end"}, 2, {"", ""}, NO_ARGS, FOCUS_CONSOLE_TOGGLE, NO_TIP},
-    {"Scan", {"ap", "station"}, 2, {"scanap", "scansta"}, NO_ARGS, FOCUS_CONSOLE_END, SHOW_STOPSCAN_TIP},
+    {"Scan",
+     {"ap", "station"},
+     2,
+     {"scanap", "scansta"},
+     NO_ARGS,
+     FOCUS_CONSOLE_END,
+     SHOW_STOPSCAN_TIP},
     {"SSID",
     {"SSID",
      {"add rand", "add name", "remove"},
      {"add rand", "add name", "remove"},
      3,
      3,
@@ -121,6 +127,13 @@ const WifiMarauderItem items[NUM_MENU_ITEMS] = {
     {"Update", {"ota", "sd"}, 2, {"update -w", "update -s"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
     {"Update", {"ota", "sd"}, 2, {"update -w", "update -s"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
     {"Reboot", {""}, 1, {"reboot"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
     {"Reboot", {""}, 1, {"reboot"}, NO_ARGS, FOCUS_CONSOLE_END, NO_TIP},
     {"Help", {""}, 1, {"help"}, NO_ARGS, FOCUS_CONSOLE_START, SHOW_STOPSCAN_TIP},
     {"Help", {""}, 1, {"help"}, NO_ARGS, FOCUS_CONSOLE_START, SHOW_STOPSCAN_TIP},
+    {"Save to flipper sdcard",
+     {""},
+     1,
+     {""},
+     NO_ARGS,
+     FOCUS_CONSOLE_START,
+     NO_TIP}, // keep at bottom or change logic below
 };
 };
 
 
 static void wifi_marauder_scene_start_var_list_enter_callback(void* context, uint32_t index) {
 static void wifi_marauder_scene_start_var_list_enter_callback(void* context, uint32_t index) {
@@ -130,6 +143,13 @@ static void wifi_marauder_scene_start_var_list_enter_callback(void* context, uin
     furi_assert(index < NUM_MENU_ITEMS);
     furi_assert(index < NUM_MENU_ITEMS);
     const WifiMarauderItem* item = &items[index];
     const WifiMarauderItem* item = &items[index];
 
 
+    if(index == NUM_MENU_ITEMS - 1) {
+        // "Save to flipper sdcard" special case - start SettingsInit widget
+        view_dispatcher_send_custom_event(
+            app->view_dispatcher, WifiMarauderEventStartSettingsInit);
+        return;
+    }
+
     const int selected_option_index = app->selected_option_index[index];
     const int selected_option_index = app->selected_option_index[index];
     furi_assert(selected_option_index < item->num_options_menu);
     furi_assert(selected_option_index < item->num_options_menu);
     app->selected_tx_string = item->actual_commands[selected_option_index];
     app->selected_tx_string = item->actual_commands[selected_option_index];
@@ -187,6 +207,11 @@ void wifi_marauder_scene_start_on_enter(void* context) {
         var_item_list, scene_manager_get_scene_state(app->scene_manager, WifiMarauderSceneStart));
         var_item_list, scene_manager_get_scene_state(app->scene_manager, WifiMarauderSceneStart));
 
 
     view_dispatcher_switch_to_view(app->view_dispatcher, WifiMarauderAppViewVarItemList);
     view_dispatcher_switch_to_view(app->view_dispatcher, WifiMarauderAppViewVarItemList);
+
+    // Wait, if the user hasn't initialized sdcard settings, let's prompt them once (then come back here)
+    if(app->need_to_prompt_settings_init) {
+        scene_manager_next_scene(app->scene_manager, WifiMarauderSceneSettingsInit);
+    }
 }
 }
 
 
 bool wifi_marauder_scene_start_on_event(void* context, SceneManagerEvent event) {
 bool wifi_marauder_scene_start_on_event(void* context, SceneManagerEvent event) {
@@ -198,16 +223,24 @@ bool wifi_marauder_scene_start_on_event(void* context, SceneManagerEvent event)
         if(event.event == WifiMarauderEventStartKeyboard) {
         if(event.event == WifiMarauderEventStartKeyboard) {
             scene_manager_set_scene_state(
             scene_manager_set_scene_state(
                 app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
                 app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
-            scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewTextInput);
+            scene_manager_next_scene(app->scene_manager, WifiMarauderSceneTextInput);
         } else if(event.event == WifiMarauderEventStartConsole) {
         } else if(event.event == WifiMarauderEventStartConsole) {
             scene_manager_set_scene_state(
             scene_manager_set_scene_state(
                 app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
                 app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
-            scene_manager_next_scene(app->scene_manager, WifiMarauderAppViewConsoleOutput);
+            scene_manager_next_scene(app->scene_manager, WifiMarauderSceneConsoleOutput);
+        } else if(event.event == WifiMarauderEventStartSettingsInit) {
+            scene_manager_set_scene_state(
+                app->scene_manager, WifiMarauderSceneStart, app->selected_menu_index);
+            scene_manager_next_scene(app->scene_manager, WifiMarauderSceneSettingsInit);
         }
         }
         consumed = true;
         consumed = true;
     } else if(event.type == SceneManagerEventTypeTick) {
     } else if(event.type == SceneManagerEventTypeTick) {
         app->selected_menu_index = variable_item_list_get_selected_item_index(app->var_item_list);
         app->selected_menu_index = variable_item_list_get_selected_item_index(app->var_item_list);
         consumed = true;
         consumed = true;
+    } else if(event.type == SceneManagerEventTypeBack) {
+        scene_manager_stop(app->scene_manager);
+        view_dispatcher_stop(app->view_dispatcher);
+        consumed = true;
     }
     }
 
 
     return consumed;
     return consumed;

+ 16 - 1
applications/external/wifi_marauder_companion/wifi_marauder_app.c

@@ -28,6 +28,8 @@ WifiMarauderApp* wifi_marauder_app_alloc() {
     app->dialogs = furi_record_open(RECORD_DIALOGS);
     app->dialogs = furi_record_open(RECORD_DIALOGS);
     app->storage = furi_record_open(RECORD_STORAGE);
     app->storage = furi_record_open(RECORD_STORAGE);
     app->capture_file = storage_file_alloc(app->storage);
     app->capture_file = storage_file_alloc(app->storage);
+    app->save_pcap_setting_file = storage_file_alloc(app->storage);
+    app->save_logs_setting_file = storage_file_alloc(app->storage);
 
 
     app->view_dispatcher = view_dispatcher_alloc();
     app->view_dispatcher = view_dispatcher_alloc();
     app->scene_manager = scene_manager_alloc(&wifi_marauder_scene_handlers, app);
     app->scene_manager = scene_manager_alloc(&wifi_marauder_scene_handlers, app);
@@ -65,6 +67,15 @@ WifiMarauderApp* wifi_marauder_app_alloc() {
     view_dispatcher_add_view(
     view_dispatcher_add_view(
         app->view_dispatcher, WifiMarauderAppViewTextInput, text_input_get_view(app->text_input));
         app->view_dispatcher, WifiMarauderAppViewTextInput, text_input_get_view(app->text_input));
 
 
+    app->widget = widget_alloc();
+    view_dispatcher_add_view(
+        app->view_dispatcher, WifiMarauderAppViewWidget, widget_get_view(app->widget));
+
+    // if user hasn't confirmed whether to save pcaps and logs to sdcard, then prompt when scene starts
+    app->need_to_prompt_settings_init =
+        (!storage_file_exists(app->storage, SAVE_PCAP_SETTING_FILEPATH) ||
+         !storage_file_exists(app->storage, SAVE_LOGS_SETTING_FILEPATH));
+
     scene_manager_next_scene(app->scene_manager, WifiMarauderSceneStart);
     scene_manager_next_scene(app->scene_manager, WifiMarauderSceneStart);
 
 
     return app;
     return app;
@@ -73,7 +84,7 @@ WifiMarauderApp* wifi_marauder_app_alloc() {
 void wifi_marauder_make_app_folder(WifiMarauderApp* app) {
 void wifi_marauder_make_app_folder(WifiMarauderApp* app) {
     furi_assert(app);
     furi_assert(app);
 
 
-    if (!storage_simply_mkdir(app->storage, MARAUDER_APP_FOLDER)) {
+    if(!storage_simply_mkdir(app->storage, MARAUDER_APP_FOLDER)) {
         dialog_message_show_storage_error(app->dialogs, "Cannot create\napp folder");
         dialog_message_show_storage_error(app->dialogs, "Cannot create\napp folder");
     }
     }
 }
 }
@@ -85,10 +96,14 @@ void wifi_marauder_app_free(WifiMarauderApp* app) {
     view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewVarItemList);
     view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewVarItemList);
     view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewConsoleOutput);
     view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewConsoleOutput);
     view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewTextInput);
     view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewTextInput);
+    view_dispatcher_remove_view(app->view_dispatcher, WifiMarauderAppViewWidget);
+    widget_free(app->widget);
     text_box_free(app->text_box);
     text_box_free(app->text_box);
     furi_string_free(app->text_box_store);
     furi_string_free(app->text_box_store);
     text_input_free(app->text_input);
     text_input_free(app->text_input);
     storage_file_free(app->capture_file);
     storage_file_free(app->capture_file);
+    storage_file_free(app->save_pcap_setting_file);
+    storage_file_free(app->save_logs_setting_file);
 
 
     // View dispatcher
     // View dispatcher
     view_dispatcher_free(app->view_dispatcher);
     view_dispatcher_free(app->view_dispatcher);

+ 11 - 2
applications/external/wifi_marauder_companion/wifi_marauder_app_i.h

@@ -14,16 +14,20 @@
 #include <gui/modules/text_box.h>
 #include <gui/modules/text_box.h>
 #include <gui/modules/text_input.h>
 #include <gui/modules/text_input.h>
 #include <gui/modules/variable_item_list.h>
 #include <gui/modules/variable_item_list.h>
+#include <gui/modules/widget.h>
 
 
 #include <storage/storage.h>
 #include <storage/storage.h>
 #include <dialogs/dialogs.h>
 #include <dialogs/dialogs.h>
 
 
-#define NUM_MENU_ITEMS (16)
+#define NUM_MENU_ITEMS (17)
 
 
 #define WIFI_MARAUDER_TEXT_BOX_STORE_SIZE (4096)
 #define WIFI_MARAUDER_TEXT_BOX_STORE_SIZE (4096)
 #define WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE (512)
 #define WIFI_MARAUDER_TEXT_INPUT_STORE_SIZE (512)
 
 
-#define MARAUDER_APP_FOLDER ANY_PATH("apps_data/marauder")
+#define MARAUDER_APP_FOLDER_USER "apps_data/marauder"
+#define MARAUDER_APP_FOLDER ANY_PATH(MARAUDER_APP_FOLDER_USER)
+#define SAVE_PCAP_SETTING_FILEPATH MARAUDER_APP_FOLDER "/save_pcaps_here.setting"
+#define SAVE_LOGS_SETTING_FILEPATH MARAUDER_APP_FOLDER "/save_logs_here.setting"
 
 
 struct WifiMarauderApp {
 struct WifiMarauderApp {
     Gui* gui;
     Gui* gui;
@@ -37,9 +41,13 @@ struct WifiMarauderApp {
     TextInput* text_input;
     TextInput* text_input;
     Storage* storage;
     Storage* storage;
     File* capture_file;
     File* capture_file;
+    File* save_pcap_setting_file;
+    File* save_logs_setting_file;
+    bool need_to_prompt_settings_init;
     DialogsApp* dialogs;
     DialogsApp* dialogs;
 
 
     VariableItemList* var_item_list;
     VariableItemList* var_item_list;
+    Widget* widget;
 
 
     WifiMarauderUart* uart;
     WifiMarauderUart* uart;
     WifiMarauderUart* lp_uart;
     WifiMarauderUart* lp_uart;
@@ -83,4 +91,5 @@ typedef enum {
     WifiMarauderAppViewVarItemList,
     WifiMarauderAppViewVarItemList,
     WifiMarauderAppViewConsoleOutput,
     WifiMarauderAppViewConsoleOutput,
     WifiMarauderAppViewTextInput,
     WifiMarauderAppViewTextInput,
+    WifiMarauderAppViewWidget,
 } WifiMarauderAppView;
 } WifiMarauderAppView;

+ 2 - 1
applications/external/wifi_marauder_companion/wifi_marauder_custom_event.h

@@ -5,5 +5,6 @@ typedef enum {
     WifiMarauderEventStartConsole,
     WifiMarauderEventStartConsole,
     WifiMarauderEventStartKeyboard,
     WifiMarauderEventStartKeyboard,
     WifiMarauderEventSaveSourceMac,
     WifiMarauderEventSaveSourceMac,
-    WifiMarauderEventSaveDestinationMac
+    WifiMarauderEventSaveDestinationMac,
+    WifiMarauderEventStartSettingsInit
 } WifiMarauderCustomEvent;
 } WifiMarauderCustomEvent;

+ 11 - 5
applications/external/wifi_marauder_companion/wifi_marauder_pcap.c

@@ -7,7 +7,7 @@ void wifi_marauder_get_prefix_from_cmd(char* dest, const char* command) {
     end = strcspn(command, " ");
     end = strcspn(command, " ");
     delta = end - start;
     delta = end - start;
     strncpy(dest, command + start, end - start);
     strncpy(dest, command + start, end - start);
-    dest[delta] = '\0';    
+    dest[delta] = '\0';
 }
 }
 
 
 void wifi_marauder_create_pcap_file(WifiMarauderApp* app) {
 void wifi_marauder_create_pcap_file(WifiMarauderApp* app) {
@@ -15,13 +15,19 @@ void wifi_marauder_create_pcap_file(WifiMarauderApp* app) {
     char capture_file_path[100];
     char capture_file_path[100];
     wifi_marauder_get_prefix_from_cmd(prefix, app->selected_tx_string);
     wifi_marauder_get_prefix_from_cmd(prefix, app->selected_tx_string);
 
 
-    int i=0;
-    do{
-        snprintf(capture_file_path, sizeof(capture_file_path), "%s/%s_%d.pcap", MARAUDER_APP_FOLDER, prefix, i);
+    int i = 0;
+    do {
+        snprintf(
+            capture_file_path,
+            sizeof(capture_file_path),
+            "%s/%s_%d.pcap",
+            MARAUDER_APP_FOLDER,
+            prefix,
+            i);
         i++;
         i++;
     } while(storage_file_exists(app->storage, capture_file_path));
     } while(storage_file_exists(app->storage, capture_file_path));
 
 
-    if (!storage_file_open(app->capture_file, capture_file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
+    if(!storage_file_open(app->capture_file, capture_file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
         dialog_message_show_storage_error(app->dialogs, "Cannot open pcap file");
         dialog_message_show_storage_error(app->dialogs, "Cannot open pcap file");
     }
     }
 }
 }

+ 4 - 3
applications/external/wifi_marauder_companion/wifi_marauder_uart.c

@@ -66,7 +66,8 @@ void wifi_marauder_lp_uart_tx(uint8_t* data, size_t len) {
     furi_hal_uart_tx(LP_UART_CH, data, len);
     furi_hal_uart_tx(LP_UART_CH, data, len);
 }
 }
 
 
-WifiMarauderUart* wifi_marauder_uart_init(WifiMarauderApp* app, FuriHalUartId channel, const char* thread_name) {
+WifiMarauderUart*
+    wifi_marauder_uart_init(WifiMarauderApp* app, FuriHalUartId channel, const char* thread_name) {
     WifiMarauderUart* uart = malloc(sizeof(WifiMarauderUart));
     WifiMarauderUart* uart = malloc(sizeof(WifiMarauderUart));
 
 
     uart->app = app;
     uart->app = app;
@@ -90,11 +91,11 @@ WifiMarauderUart* wifi_marauder_uart_init(WifiMarauderApp* app, FuriHalUartId ch
 }
 }
 
 
 WifiMarauderUart* wifi_marauder_usart_init(WifiMarauderApp* app) {
 WifiMarauderUart* wifi_marauder_usart_init(WifiMarauderApp* app) {
-    return wifi_marauder_uart_init(app, UART_CH,"WifiMarauderUartRxThread");
+    return wifi_marauder_uart_init(app, UART_CH, "WifiMarauderUartRxThread");
 }
 }
 
 
 WifiMarauderUart* wifi_marauder_lp_uart_init(WifiMarauderApp* app) {
 WifiMarauderUart* wifi_marauder_lp_uart_init(WifiMarauderApp* app) {
-    return wifi_marauder_uart_init(app, LP_UART_CH,"WifiMarauderLPUartRxThread");
+    return wifi_marauder_uart_init(app, LP_UART_CH, "WifiMarauderLPUartRxThread");
 }
 }
 
 
 void wifi_marauder_uart_free(WifiMarauderUart* uart) {
 void wifi_marauder_uart_free(WifiMarauderUart* uart) {