Fix environments without leds

This commit is contained in:
Djuri Baars 2024-03-30 15:24:10 +01:00
parent 486a1b9be2
commit 0a3f747d00
3 changed files with 6 additions and 0 deletions

View file

@ -280,6 +280,7 @@ void HandleButtonTask(void *pvParameters)
Serial.println("Button Pressed"); Serial.println("Button Pressed");
#ifdef NUM_LEDS
leds[0] = CRGB::SkyBlue; leds[0] = CRGB::SkyBlue;
leds[1] = CRGB::Black; leds[1] = CRGB::Black;
@ -298,6 +299,7 @@ void HandleButtonTask(void *pvParameters)
leds[1] = CRGB::Black; leds[1] = CRGB::Black;
FastLED.show(); FastLED.show();
#endif
} }
} }
} }

View file

@ -34,7 +34,9 @@ uint currentPrice = 0;
String currentBlock = ""; String currentBlock = "";
String currentFees = ""; String currentFees = "";
#ifdef NUM_LEDS
CRGB leds[NUM_LEDS]; CRGB leds[NUM_LEDS];
#endif
void setup() void setup()
{ {

View file

@ -104,5 +104,7 @@ extern char currentIcon1;
extern char currentIcon2; extern char currentIcon2;
extern char currentIcon3; extern char currentIcon3;
#ifdef NUM_LEDS
extern CRGB leds[NUM_LEDS]; extern CRGB leds[NUM_LEDS];
#endif
extern volatile bool buttonPressed; extern volatile bool buttonPressed;