-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Antonio Murdaca <[email protected]>
- Loading branch information
Showing
52 changed files
with
7,334 additions
and
6,367 deletions.
There are no files selected for viewing
1,348 changes: 674 additions & 674 deletions
1,348
flipper_companion_apps/applications/external/esp32cam_marauder_companion/LICENSE
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
flipper_companion_apps/applications/external/esp32cam_marauder_companion/application.fam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
...companion_apps/applications/external/esp32cam_marauder_companion/docs/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
## WiFi Marauder companion app for Flipper Zero | ||
|
||
Requires a connected dev board running Marauder FW. See install instructions from UberGuidoZ here: https://github.com/UberGuidoZ/Flipper/tree/main/Wifi_DevBoard#marauder-install-information | ||
|
||
## Support | ||
|
||
For app feedback, bugs, and feature requests, please create an issue here: https://github.com/0xchocolate/flipperzero-wifi-marauder/issues | ||
|
||
You can find me (0xchocolate) on discord as @cococode. | ||
## WiFi Marauder companion app for Flipper Zero | ||
|
||
Requires a connected dev board running Marauder FW. See install instructions from UberGuidoZ here: https://github.com/UberGuidoZ/Flipper/tree/main/Wifi_DevBoard#marauder-install-information | ||
|
||
## Support | ||
|
||
For app feedback, bugs, and feature requests, please create an issue here: https://github.com/0xchocolate/flipperzero-wifi-marauder/issues | ||
|
||
You can find me (0xchocolate) on discord as @cococode. |
90 changes: 45 additions & 45 deletions
90
...r_companion_apps/applications/external/esp32cam_marauder_companion/file/sequential_file.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
#include "sequential_file.h" | ||
|
||
char* sequential_file_resolve_path( | ||
Storage* storage, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension) { | ||
if(storage == NULL || dir == NULL || prefix == NULL || extension == NULL) { | ||
return NULL; | ||
} | ||
|
||
char file_path[256]; | ||
int file_index = 0; | ||
|
||
do { | ||
if(snprintf( | ||
file_path, sizeof(file_path), "%s/%s_%d.%s", dir, prefix, file_index, extension) < | ||
0) { | ||
return NULL; | ||
} | ||
file_index++; | ||
} while(storage_file_exists(storage, file_path)); | ||
|
||
return strdup(file_path); | ||
} | ||
|
||
bool sequential_file_open( | ||
Storage* storage, | ||
File* file, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension) { | ||
if(storage == NULL || file == NULL || dir == NULL || prefix == NULL || extension == NULL) { | ||
return false; | ||
} | ||
|
||
char* file_path = sequential_file_resolve_path(storage, dir, prefix, extension); | ||
if(file_path == NULL) { | ||
return false; | ||
} | ||
|
||
bool success = storage_file_open(file, file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS); | ||
free(file_path); | ||
|
||
return success; | ||
#include "sequential_file.h" | ||
|
||
char* sequential_file_resolve_path( | ||
Storage* storage, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension) { | ||
if(storage == NULL || dir == NULL || prefix == NULL || extension == NULL) { | ||
return NULL; | ||
} | ||
|
||
char file_path[256]; | ||
int file_index = 0; | ||
|
||
do { | ||
if(snprintf( | ||
file_path, sizeof(file_path), "%s/%s_%d.%s", dir, prefix, file_index, extension) < | ||
0) { | ||
return NULL; | ||
} | ||
file_index++; | ||
} while(storage_file_exists(storage, file_path)); | ||
|
||
return strdup(file_path); | ||
} | ||
|
||
bool sequential_file_open( | ||
Storage* storage, | ||
File* file, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension) { | ||
if(storage == NULL || file == NULL || dir == NULL || prefix == NULL || extension == NULL) { | ||
return false; | ||
} | ||
|
||
char* file_path = sequential_file_resolve_path(storage, dir, prefix, extension); | ||
if(file_path == NULL) { | ||
return false; | ||
} | ||
|
||
bool success = storage_file_open(file, file_path, FSAM_WRITE, FSOM_CREATE_ALWAYS); | ||
free(file_path); | ||
|
||
return success; | ||
} |
28 changes: 14 additions & 14 deletions
28
...r_companion_apps/applications/external/esp32cam_marauder_companion/file/sequential_file.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#pragma once | ||
|
||
#include <storage/storage.h> | ||
|
||
char* sequential_file_resolve_path( | ||
Storage* storage, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension); | ||
bool sequential_file_open( | ||
Storage* storage, | ||
File* file, | ||
const char* dir, | ||
const char* prefix, | ||
#pragma once | ||
|
||
#include <storage/storage.h> | ||
|
||
char* sequential_file_resolve_path( | ||
Storage* storage, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension); | ||
bool sequential_file_open( | ||
Storage* storage, | ||
File* file, | ||
const char* dir, | ||
const char* prefix, | ||
const char* extension); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.