From 17ed1ff7fa973456a578b31de0bf78ff555ae90b Mon Sep 17 00:00:00 2001 From: Marcel Peterkau Date: Sun, 21 Aug 2022 15:47:58 +0200 Subject: [PATCH] Added define to disable flashing of LED --- Software/platformio.ini | 1 + Software/src/main.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Software/platformio.ini b/Software/platformio.ini index 3ee240a..4ed0a7a 100644 --- a/Software/platformio.ini +++ b/Software/platformio.ini @@ -37,6 +37,7 @@ build_flags = ;-DFEATURE_ENABLE_CAN ;-DFEATURE_ENABLE_GPS -DPCB_REV=2 + -DNO_MODE_FLASH ;build_type = debug diff --git a/Software/src/main.cpp b/Software/src/main.cpp index ddd8a1c..c136ab0 100644 --- a/Software/src/main.cpp +++ b/Software/src/main.cpp @@ -529,9 +529,13 @@ void LED_Process(uint8_t override, CRGB SetColor) break; case LED_Normal: +#ifndef NO_MODE_FLASH if (timer % 2000 > 1950) leds[0] = CRGB(0, 255, 0); else if (WiFi.getMode() != WIFI_OFF && timer % 2000 > 1800 && timer % 2000 < 1850) +#else + if (WiFi.getMode() != WIFI_OFF && timer % 2000 > 1950) +#endif leds[0] = CRGB(255, 128, 0); else leds[0] = CRGB(0, 4, 0); @@ -549,9 +553,13 @@ void LED_Process(uint8_t override, CRGB SetColor) break; case LED_Rain: +#ifndef NO_MODE_FLASH if (timer % 2000 > 1950) leds[0] = CRGB(0, 0, 255); else if (WiFi.getMode() != WIFI_OFF && timer % 2000 > 1800 && timer % 2000 < 1850) +#else + if (WiFi.getMode() != WIFI_OFF && timer % 2000 > 1950) +#endif leds[0] = CRGB(255, 128, 0); else leds[0] = CRGB(0, 0, 4);