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
|
PRIV_REQUIRES
|
||||||
u8g2
|
u8g2
|
||||||
led-manager
|
led-manager
|
||||||
|
persistence-manager
|
||||||
)
|
)
|
||||||
return()
|
return()
|
||||||
endif ()
|
endif ()
|
||||||
@@ -38,4 +39,5 @@ target_include_directories(${PROJECT_NAME} PUBLIC include)
|
|||||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
u8g2
|
u8g2
|
||||||
led-manager
|
led-manager
|
||||||
|
persistence-manager
|
||||||
)
|
)
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
// Project-specific headers
|
// Project-specific headers
|
||||||
#include "common/Widget.h"
|
#include "common/Widget.h"
|
||||||
#include "../../persistence-manager/include/IPersistenceManager.h"
|
#include "IPersistenceManager.h"
|
||||||
#include "u8g2.h"
|
#include "u8g2.h"
|
||||||
|
|
||||||
class MenuItem;
|
class MenuItem;
|
||||||
|
@@ -8,6 +8,7 @@ PersistenceManager::PersistenceManager(const std::string &nvs_namespace)
|
|||||||
: namespace_(nvs_namespace), initialized_(false)
|
: namespace_(nvs_namespace), initialized_(false)
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
PersistenceManager::~PersistenceManager()
|
PersistenceManager::~PersistenceManager()
|
||||||
|
@@ -9,6 +9,8 @@ PersistenceManager::PersistenceManager(std::string filename) : m_filename(std::m
|
|||||||
{
|
{
|
||||||
SDL_Init(SDL_INIT_EVENTS);
|
SDL_Init(SDL_INIT_EVENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
PersistenceManager::~PersistenceManager()
|
PersistenceManager::~PersistenceManager()
|
||||||
|
@@ -101,7 +101,6 @@ static void init_ui(void)
|
|||||||
.onButtonClicked = nullptr,
|
.onButtonClicked = nullptr,
|
||||||
.persistenceManager = std::make_shared<PersistenceManager>(),
|
.persistenceManager = std::make_shared<PersistenceManager>(),
|
||||||
};
|
};
|
||||||
options.persistenceManager->Load();
|
|
||||||
m_widget = std::make_shared<SplashScreen>(&options);
|
m_widget = std::make_shared<SplashScreen>(&options);
|
||||||
m_inactivityTracker = std::make_unique<InactivityTracker>(60000, []() {
|
m_inactivityTracker = std::make_unique<InactivityTracker>(60000, []() {
|
||||||
auto screensaver = std::make_shared<ScreenSaver>(&options);
|
auto screensaver = std::make_shared<ScreenSaver>(&options);
|
||||||
|
Reference in New Issue
Block a user