From 8e868da6928ed0878cb3c9df2ea7d46bd86c55a2 Mon Sep 17 00:00:00 2001 From: Marc Pasteur Date: Thu, 26 Feb 2026 23:20:19 +0100 Subject: [PATCH] linux compat --- components/domotic_display/test_host/CMakeLists.txt | 1 + components/domotic_display/test_host/main/CMakeLists.txt | 2 +- components/eventsManager/CMakeLists.txt | 6 ++++++ components/eventsManager/eventsManager.c | 6 +++++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/components/domotic_display/test_host/CMakeLists.txt b/components/domotic_display/test_host/CMakeLists.txt index a561131..261342c 100644 --- a/components/domotic_display/test_host/CMakeLists.txt +++ b/components/domotic_display/test_host/CMakeLists.txt @@ -10,6 +10,7 @@ list(APPEND EXTRA_COMPONENT_DIRS ../../stateManagement ../../eventsManager ../../RemindMe + ../../washingMachineState ) idf_build_set_property(COMPILE_DEFINITIONS "NO_DEBUG_STORAGE" APPEND) diff --git a/components/domotic_display/test_host/main/CMakeLists.txt b/components/domotic_display/test_host/main/CMakeLists.txt index e07cd02..cd398e9 100644 --- a/components/domotic_display/test_host/main/CMakeLists.txt +++ b/components/domotic_display/test_host/main/CMakeLists.txt @@ -20,7 +20,7 @@ idf_component_register(SRCS "../../include" "../mock" WHOLE_ARCHIVE - REQUIRES lvgl meteofrance RemindMe) + REQUIRES lvgl meteofrance RemindMe washingMachineState) message("Including SDL2 support") find_package(PkgConfig REQUIRED) diff --git a/components/eventsManager/CMakeLists.txt b/components/eventsManager/CMakeLists.txt index 20243aa..26051ac 100644 --- a/components/eventsManager/CMakeLists.txt +++ b/components/eventsManager/CMakeLists.txt @@ -1,3 +1,9 @@ +if(${IDF_TARGET} STREQUAL "esp32p4") idf_component_register(SRCS "obtain_time.c" "eventsManager.c" obtain_time.c INCLUDE_DIRS "include" REQUIRES mqtt esp_netif meteofrance audio) +else() +idf_component_register(SRCS "obtain_time.c" "eventsManager.c" obtain_time.c + INCLUDE_DIRS "include" + REQUIRES mqtt esp_netif meteofrance) +endif() diff --git a/components/eventsManager/eventsManager.c b/components/eventsManager/eventsManager.c index 1c3c4d7..2c5b4bc 100644 --- a/components/eventsManager/eventsManager.c +++ b/components/eventsManager/eventsManager.c @@ -6,7 +6,9 @@ #include "obtain_time.h" #include #include "meteofrance.h" -#include "audio.h" +#if CONFIG_IDF_TARGET_ESP32P4 + #include "audio.h" +#endif EventGroupHandle_t domotic_event_group; QueueHandle_t ihm_queue; @@ -207,7 +209,9 @@ void send_event(domo_events evt, void* pDatas) { } case EVT_FIN_MACHINE:{ + #if CONFIG_IDF_TARGET_ESP32P4 playSound(); + #endif free(ihmEvt); // rien à envoyer à l'IHM ihmEvt = NULL; break;