From 50c7455cc0c63db04a317cf9c8f5ce20dde21f71 Mon Sep 17 00:00:00 2001 From: Pascal Brunot Date: Thu, 8 Aug 2024 21:06:57 +0200 Subject: [PATCH] Moved sMQTTBroker dependency to wokwi environment only --- platformio.ini | 5 +++-- src/mock/MockMQTTBroker.cpp | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index a96871ea..981b17e9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -26,11 +26,10 @@ lib_ldf_mode = deep lib_deps = https://github.com/PBrunot/LiquidCrystal.git#use_const https://github.com/bblanchon/ArduinoJson.git#v7.1.0 256dpi/MQTT - https://github.com/OSSLibraries/Arduino_MFRC522v2.git#2.0.4 + https://github.com/OSSLibraries/Arduino_MFRC522v2.git#2.0.5 Wire adafruit/Adafruit NeoPixel@^1.12.3 https://github.com/tzapu/WiFiManager.git@2.0.17 - https://github.com/terrorsl/sMQTTBroker.git@0.1.8 ArduinoOTA build_unflags = -std=gnu++11 -fexceptions build_flags = -std=gnu++2b @@ -98,6 +97,8 @@ upload_port = 192.168.45.82 [env:wokwi] board = esp32-s2-saola-1 +lib_deps = ${env.lib_deps} + https://github.com/terrorsl/sMQTTBroker.git@0.1.8 build_type = debug build_src_flags = ${env.build_src_flags} -D MQTT_SIMULATION=true diff --git a/src/mock/MockMQTTBroker.cpp b/src/mock/MockMQTTBroker.cpp index f4115ce0..59cb0ff6 100644 --- a/src/mock/MockMQTTBroker.cpp +++ b/src/mock/MockMQTTBroker.cpp @@ -1,3 +1,5 @@ +#if (MQTT_SIMULATION) + #include "mock/MockMQTTBroker.hpp" #include "Logging.hpp" #include "conf.hpp" @@ -250,3 +252,5 @@ namespace fabomatic } } } // namespace fabomatic + +#endif // #if (MQTT_SIMULATION) \ No newline at end of file