From 531256529fe534124a58054666014f44e57eb5d3 Mon Sep 17 00:00:00 2001 From: eugen Date: Thu, 22 Jan 2026 17:33:19 +0100 Subject: [PATCH] =?UTF-8?q?Die=20Flag-Funktion=20f=C3=BCrs=20mDNS-Icon=20k?= =?UTF-8?q?orregiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firmware/src/main.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/firmware/src/main.c b/firmware/src/main.c index c0de263..51bfab9 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -154,22 +154,12 @@ static lv_indev_t *lvgl_touch_indev = NULL; /* --- Button Handle global halten, falls benötigt --- */ static button_handle_t g_btn = NULL; -static void app_update_mdns_influx_status(void) +static void app_update_mdns_status_from_nvs(void) { char *url = NULL; + bool ok = storage_load_service_url(&url); - // Ich kenne deine exakte storage-API nicht – bitte eine vorhandene Funktion nutzen: - // Beispiele: storage_load_service_url(&url) oder storage_get_service_url(&url) - // -> Nimm die, die bei dir existiert. - bool ok = storage_load_service_url(&url); // <- ggf. Namen anpassen - - if (ok && url && url[0]) { - sys_status_set_mdns_ok(true); - sys_status_set_influx_ok(true); - } else { - sys_status_set_mdns_ok(false); - sys_status_set_influx_ok(false); - } + sys_status_set_mdns_ok(ok && url && url[0]); // nur mDNS if (url) free(url); } @@ -247,9 +237,7 @@ static esp_err_t app_lvgl_init(void) static void ui_tick_cb(lv_timer_t *t) { (void)t; - - app_update_mdns_influx_status(); // <<< NEU - + app_update_mdns_status_from_nvs(); if (lvgl_port_lock(0)) { ui_update_status_icons(); tick_screen(0);