This commit is contained in:
Thomas Peterson 2026-01-23 17:21:54 +01:00
parent 8720b56749
commit da30730029
3 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ static void screen_long_press_handler(lv_event_t * e)
void Gui::create() void Gui::create()
{ {
// Initialize WidgetManager (loads config from NVS) // Initialize WidgetManager (loads config from SD card)
WidgetManager::instance().init(); WidgetManager::instance().init();
if (esp_lv_adapter_lock(-1) == ESP_OK) { if (esp_lv_adapter_lock(-1) == ESP_OK) {

View File

@ -8,7 +8,7 @@ class WidgetManager {
public: public:
static WidgetManager& instance(); static WidgetManager& instance();
// Initialize (load config from NVS) // Initialize (load config from SD card)
void init(); void init();
// Build/rebuild all widgets from current config // Build/rebuild all widgets from current config
@ -21,7 +21,7 @@ public:
// Update config from web editor (JSON) - does NOT apply immediately // Update config from web editor (JSON) - does NOT apply immediately
bool updateConfigFromJson(const char* json); bool updateConfigFromJson(const char* json);
// Save current config to NVS and apply to display // Save current config to SD card and apply to display
void saveAndApply(); void saveAndApply();
// Reset to factory defaults // Reset to factory defaults

View File

@ -56,15 +56,15 @@ public:
} }
void run() { void run() {
ESP_LOGI(TAG, "Creating UI");
knxWorker.init();
gui.create();
// Initialize SD card for web content and config storage // Initialize SD card for web content and config storage
if (!SdCard::instance().init()) { if (!SdCard::instance().init()) {
ESP_LOGW(TAG, "SD card not available, using defaults"); ESP_LOGW(TAG, "SD card not available, using defaults");
} }
ESP_LOGI(TAG, "Creating UI");
knxWorker.init();
gui.create();
// Start WebServer for widget configuration // Start WebServer for widget configuration
WebServer::instance().start(); WebServer::instance().start();