Skip to content

Commit

Permalink
upd wifi marauder app
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Mar 20, 2024
1 parent 26ad6d8 commit f242900
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion base_pack/wifi_marauder_companion/application.fam
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
App(
appid="esp32_wifi_marauder",
name="[ESP32] WiFi Marauder",
fap_version=(7, 0),
fap_version=(7, 1),
apptype=FlipperAppType.EXTERNAL,
entry_point="wifi_marauder_app",
requires=["gui"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,19 @@ void wifi_marauder_scene_console_output_on_enter(void* context) {
// Create files *before* sending command
// (it takes time to iterate through the directory)
if(app->ok_to_save_logs) {
strcpy(
app->log_file_path,
sequential_file_resolve_path(
app->storage, MARAUDER_APP_FOLDER_LOGS, prefix, "log"));
if(storage_file_open(
app->log_file, app->log_file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
app->is_writing_log = true;
char* resolved_path = sequential_file_resolve_path(
app->storage, MARAUDER_APP_FOLDER_LOGS, prefix, "log");
if(resolved_path != NULL) {
strcpy(app->log_file_path, resolved_path);
free(resolved_path);
if(storage_file_open(
app->log_file, app->log_file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
app->is_writing_log = true;
} else {
dialog_message_show_storage_error(app->dialogs, "Cannot open log file");
}
} else {
dialog_message_show_storage_error(app->dialogs, "Cannot open log file");
dialog_message_show_storage_error(app->dialogs, "Cannot resolve log path");
}
}

Expand Down
4 changes: 4 additions & 0 deletions base_pack/wifi_marauder_companion/wifi_marauder_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ void wifi_marauder_make_app_folder(WifiMarauderApp* app) {
if(!storage_simply_mkdir(app->storage, MARAUDER_APP_FOLDER_SCRIPTS)) {
dialog_message_show_storage_error(app->dialogs, "Cannot create\nscripts folder");
}

if(!storage_simply_mkdir(app->storage, MARAUDER_APP_FOLDER_HTML)) {
dialog_message_show_storage_error(app->dialogs, "Cannot create\nhtml folder");
}
}

void wifi_marauder_load_settings(WifiMarauderApp* app) {
Expand Down
2 changes: 1 addition & 1 deletion base_pack/wifi_marauder_companion/wifi_marauder_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
extern "C" {
#endif

#define WIFI_MARAUDER_APP_VERSION "v0.7.0"
#define WIFI_MARAUDER_APP_VERSION "v0.7.1"

typedef struct WifiMarauderApp WifiMarauderApp;

Expand Down

0 comments on commit f242900

Please sign in to comment.