Move subghz bruteforcer settings file to apps_data --nobuild

This commit is contained in:
Willy-JL
2023-09-16 19:32:21 +02:00
parent c28901462f
commit 84aa55b718

View File

@@ -5,7 +5,7 @@
#define SUBBRUTE_SETTINGS_FILE_TYPE "Sub-GHz BruteForcer Settings File"
#define SUBBRUTE_SETTINGS_FILE_VERSION 1
#define SUBBRUTE_SETTINGS_PATH EXT_PATH("subghz-bruteforcer.settings")
#define SUBBRUTE_SETTINGS_PATH APP_DATA_PATH("subghz-bruteforcer.settings")
#define SUBBRUTE_FIELD_LAST_INDEX "LastIndex"
#define SUBBRUTE_FIELD_REPEAT_VALUES "RepeatValue"
@@ -31,6 +31,9 @@ void subbrute_settings_load(SubBruteSettings* instance) {
bool was_read_last_index = false;
bool was_read_repeat_values = false;
storage_common_migrate(
storage, EXT_PATH("subghz-bruteforcer.settings"), SUBBRUTE_SETTINGS_PATH);
if(FSE_OK == storage_sd_status(storage) && SUBBRUTE_SETTINGS_PATH &&
flipper_format_file_open_existing(fff_data_file, SUBBRUTE_SETTINGS_PATH)) {
was_read_last_index = flipper_format_read_uint32(