From 707df025b8d69289ef905002ebb0ed7e9665eef8 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 11 Dec 2025 00:42:59 +0100 Subject: [PATCH] =?UTF-8?q?Refactor:=20dns=5Fcaptive=20als=20eigenst=C3=A4?= =?UTF-8?q?ndige=20ESP-IDF-Komponente=20ausgelagert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - dns_captive.c/.h nach components/dns_captive verschoben - Neues CMakeLists.txt für Komponente ergänzt - src/CMakeLists.txt angepasst (komponentenbasiert, REQUIRES dns_captive) - Projektstruktur bereinigt und klar modularisiert --- .../components/dns_captive/CMakeLists.txt | 9 +++++ .../dns_captive/include}/dns_captive.h | 0 .../dns_captive}/src/dns_captive.c | 0 firmware/src/CMakeLists.txt | 34 +++++++++---------- firmware/src/wifi_mgr.c | 3 +- 5 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 firmware/components/dns_captive/CMakeLists.txt rename firmware/{src => components/dns_captive/include}/dns_captive.h (100%) rename firmware/{ => components/dns_captive}/src/dns_captive.c (100%) diff --git a/firmware/components/dns_captive/CMakeLists.txt b/firmware/components/dns_captive/CMakeLists.txt new file mode 100644 index 0000000..99a80d5 --- /dev/null +++ b/firmware/components/dns_captive/CMakeLists.txt @@ -0,0 +1,9 @@ +idf_component_register( + SRCS + "src/dns_captive.c" + INCLUDE_DIRS + "include" + REQUIRES + lwip + esp_netif +) diff --git a/firmware/src/dns_captive.h b/firmware/components/dns_captive/include/dns_captive.h similarity index 100% rename from firmware/src/dns_captive.h rename to firmware/components/dns_captive/include/dns_captive.h diff --git a/firmware/src/dns_captive.c b/firmware/components/dns_captive/src/dns_captive.c similarity index 100% rename from firmware/src/dns_captive.c rename to firmware/components/dns_captive/src/dns_captive.c diff --git a/firmware/src/CMakeLists.txt b/firmware/src/CMakeLists.txt index 50e90f4..d565835 100644 --- a/firmware/src/CMakeLists.txt +++ b/firmware/src/CMakeLists.txt @@ -1,19 +1,17 @@ +set(app_sources + "main.c" + "http_portal.c" + "lv_fs_port.c" + "net_influx.c" + "net_mdns.c" + "sen5x_app.c" + "storage.c" + "sys_status.c" + "wifi_mgr.c" +) + idf_component_register( - SRCS - "main.c" - "lv_fs_port.c" - "wifi_mgr.c" - "http_portal.c" - "storage.c" - "dns_captive.c" - "net_mdns.c" - "net_influx.c" - "sys_status.c" - "sen5x_app.c" - INCLUDE_DIRS - "." - REQUIRES - driver - freertos - log -) \ No newline at end of file + SRCS ${app_sources} + INCLUDE_DIRS "." + REQUIRES dns_captive +) diff --git a/firmware/src/wifi_mgr.c b/firmware/src/wifi_mgr.c index c349b73..9bad966 100644 --- a/firmware/src/wifi_mgr.c +++ b/firmware/src/wifi_mgr.c @@ -19,10 +19,9 @@ #include "http_portal.h" #include "wifi_mgr.h" -#include "storage.h" // NVS-Zugriffe +#include "storage.h" #include "net_mdns.h" #include "sys_status.h" - #include "dns_captive.h" // ---------- Konfig ----------