Fixes
This commit is contained in:
parent
8720b56749
commit
da30730029
@ -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) {
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
@ -89,4 +89,4 @@ extern "C" void app_main(void)
|
|||||||
Application app;
|
Application app;
|
||||||
app.init();
|
app.init();
|
||||||
app.run();
|
app.run();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user