From ad7299b0678beefb0f489ff5af6d1d9939b584d2 Mon Sep 17 00:00:00 2001 From: Markus Kirberg Date: Sun, 29 Dec 2024 11:06:38 +0000 Subject: [PATCH] conditional only if led support --- src/shelly_statusled.cpp | 5 ++++- src/shelly_statusled.hpp | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/shelly_statusled.cpp b/src/shelly_statusled.cpp index 4a8c8d84..5b7ab68c 100644 --- a/src/shelly_statusled.cpp +++ b/src/shelly_statusled.cpp @@ -14,9 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #include "shelly_statusled.hpp" +#ifdef MGOS_CONFIG_HAVE_LED + namespace shelly { StatusLED::StatusLED(int id, int pin, int num_pixel, @@ -72,3 +73,5 @@ Status StatusLED::SetState(bool on, const char *source) { } } // namespace shelly + +#endif diff --git a/src/shelly_statusled.hpp b/src/shelly_statusled.hpp index 6eb1229d..54ae6d7a 100644 --- a/src/shelly_statusled.hpp +++ b/src/shelly_statusled.hpp @@ -15,11 +15,14 @@ * limitations under the License. */ +#include "mgos_config.h" + +#ifdef MGOS_CONFIG_HAVE_LED + #pragma once #include "shelly_output.hpp" -#include "mgos_config.h" #include "mgos_neopixel.h" namespace shelly { @@ -59,3 +62,5 @@ class StatusLED : public Output { }; } // namespace shelly + +#endif \ No newline at end of file