moved pmem setting restore before top bar is loaded (#1105)

* moved pmem setting restore before top bar is loaded
* added a check pmem from sdcard function, replaced occurences, added a save to file on back button
* Added defines for flag file and dump file, changed test func name to should_use_sdcard_for_pmem, used file_exists, removed save and load pmem parameter
* changed a text to a more comprehesible one
This commit is contained in:
gullradriel 2023-06-04 21:25:25 +02:00 committed by GitHub
parent e3e179e380
commit 7e8a139732
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 30 deletions

View file

@ -32,6 +32,11 @@
#include "modems.hpp"
#include "serializer.hpp"
// persistant memory from/to sdcard flag file
#define PMEM_FILEFLAG "/SETTINGS/PMEM_FILEFLAG"
// persistant memory from/to sdcard flag file
#define PMEM_SETTING_FILE "/SETTINGS/pmem_settings"
using namespace modems;
using namespace serializer;
@ -244,8 +249,9 @@ void set_recon_load_hamradios(const bool v);
void set_recon_match_mode(const bool v);
// sd persisting settings
int save_persistent_settings_to_file(std::string filename);
int load_persistent_settings_from_file(std::string filename);
bool should_use_sdcard_for_pmem();
int save_persistent_settings_to_file();
int load_persistent_settings_from_file();
} /* namespace persistent_memory */