auto load and dependency fix
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -20,6 +20,7 @@ if (DEFINED ENV{IDF_PATH})
|
||||
PRIV_REQUIRES
|
||||
u8g2
|
||||
led-manager
|
||||
persistence-manager
|
||||
)
|
||||
return()
|
||||
endif ()
|
||||
@@ -38,4 +39,5 @@ target_include_directories(${PROJECT_NAME} PUBLIC include)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
u8g2
|
||||
led-manager
|
||||
persistence-manager
|
||||
)
|
@@ -17,7 +17,7 @@
|
||||
|
||||
// Project-specific headers
|
||||
#include "common/Widget.h"
|
||||
#include "../../persistence-manager/include/IPersistenceManager.h"
|
||||
#include "IPersistenceManager.h"
|
||||
#include "u8g2.h"
|
||||
|
||||
class MenuItem;
|
||||
|
@@ -8,6 +8,7 @@ PersistenceManager::PersistenceManager(const std::string &nvs_namespace)
|
||||
: namespace_(nvs_namespace), initialized_(false)
|
||||
{
|
||||
Initialize();
|
||||
Load();
|
||||
}
|
||||
|
||||
PersistenceManager::~PersistenceManager()
|
||||
|
@@ -9,6 +9,8 @@ PersistenceManager::PersistenceManager(std::string filename) : m_filename(std::m
|
||||
{
|
||||
SDL_Init(SDL_INIT_EVENTS);
|
||||
}
|
||||
|
||||
Load();
|
||||
}
|
||||
|
||||
PersistenceManager::~PersistenceManager()
|
||||
|
@@ -101,7 +101,6 @@ static void init_ui(void)
|
||||
.onButtonClicked = nullptr,
|
||||
.persistenceManager = std::make_shared<PersistenceManager>(),
|
||||
};
|
||||
options.persistenceManager->Load();
|
||||
m_widget = std::make_shared<SplashScreen>(&options);
|
||||
m_inactivityTracker = std::make_unique<InactivityTracker>(60000, []() {
|
||||
auto screensaver = std::make_shared<ScreenSaver>(&options);
|
||||
|
Reference in New Issue
Block a user