From 6ab145e5cd6ce5125ea522d89298331cf40bd8a6 Mon Sep 17 00:00:00 2001 From: Levi Gillis Date: Fri, 10 Dec 2021 19:12:14 +0100 Subject: [PATCH] Added some forgotten compiler statements --- src/ledmgr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ledmgr.cpp b/src/ledmgr.cpp index 14da1f9..ee129a4 100644 --- a/src/ledmgr.cpp +++ b/src/ledmgr.cpp @@ -21,7 +21,9 @@ namespace LEDMGR */ void Off(uint8_t pin) { +#if ENABLE_LEDS digitalWrite(pin, HIGH); +#endif } /*! @@ -35,9 +37,11 @@ namespace LEDMGR */ void Blink(uint8_t pin, unsigned long time, uint8_t direction) { +#if ENABLE_LEDS digitalWrite(pin, direction); delay(time); digitalWrite(pin, direction ^ 1); +#endif } /*! @@ -55,6 +59,7 @@ namespace LEDMGR */ void Pattern(uint8_t pin, unsigned long timeon, unsigned long timeoff, int times, uint8_t direction) { +#if ENABLE_LEDS for (int i = 0; i < times; i++) { digitalWrite(pin, direction); @@ -62,5 +67,6 @@ namespace LEDMGR digitalWrite(pin, direction ^ 1); delay(timeoff); } +#endif } } \ No newline at end of file