diff --git a/platformio.ini b/platformio.ini index 7251771..07a6db8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -140,6 +140,7 @@ build_flags = -D ESP32_CAM -D MONITOR_SPEED=${this.monitor_speed} lib_deps = + ;https://github.com/takkaO/OpenFontRender bblanchon/ArduinoJson@^6.21.2 https://github.com/tzapu/WiFiManager.git mathertel/OneButton @ ^2.0.3 diff --git a/src/drivers/storage/SDCard.h b/src/drivers/storage/SDCard.h index bf7f2b7..e5cf7e9 100644 --- a/src/drivers/storage/SDCard.h +++ b/src/drivers/storage/SDCard.h @@ -5,6 +5,7 @@ #include "storage.h" #include "nvMemory.h" +// Handles the transfer of settings from sd card to nv memory (wifi credentials are handled by wifimanager) class SDCard { public: @@ -143,7 +144,7 @@ bool SDCard::initSDcard() SDCard::SDCard() {} SDCard::~SDCard() {} -void SDCard::SD2NVMemory(NVMemory* nvMem) {}; +void SDCard::SD2nvMemory(nvMemory* nvMem) {}; bool SDCard::loadConfigFile(TSettings* Settings) { return false; } bool SDCard::initSDcard() { return false; } diff --git a/src/drivers/storage/nvMemory.h b/src/drivers/storage/nvMemory.h index 448e1fb..777e46a 100644 --- a/src/drivers/storage/nvMemory.h +++ b/src/drivers/storage/nvMemory.h @@ -1,11 +1,13 @@ #ifndef _NVMEMORY_H_ #define _NVMEMORY_H_ -#define BUILD_SPIFFS +// we only have one implementation right now and nothing to choose from. +#define NVMEM_SPIFFS #include "..\drivers.h" #include "storage.h" +// Handles load and store of user settings, except wifi credentials. Those are managed by the wifimanager. class nvMemory { public: @@ -19,14 +21,13 @@ private: bool Initialized_; }; -#ifdef BUILD_SPIFFS +#ifdef NVMEM_SPIFFS #define ESP_DRD_USE_SPIFFS true #include #include #include -#include nvMemory::nvMemory() { @@ -147,21 +148,16 @@ bool nvMemory::init() #else -#error We need some kind of permanent storage here! +#error We need some kind of permanent storage implemented here! nvMemory::nvMemory() {} - nvMemory::~nvMemory() {} - bool nvMemory::saveConfig(TSettings* Settings) { return false; } - bool nvMemory::loadConfig(TSettings* Settings) { return false; } - bool nvMemory::deleteConfig() { return false; } - bool nvMemory::init() { return false; } -#endif //BUILD_SPIFFS +#endif //NVMEM_TYPE #endif // _NVMEMORY_H_