From c20100abd4da93673c33949f5ac59f7b512ecbf1 Mon Sep 17 00:00:00 2001 From: dragonchaser Date: Tue, 15 Jul 2025 09:09:47 +0200 Subject: [PATCH] add brightness control for default color Signed-off-by: dragonchaser --- btcontrol.ino | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/btcontrol.ino b/btcontrol.ino index 051b070..00d1a69 100644 --- a/btcontrol.ino +++ b/btcontrol.ino @@ -36,6 +36,7 @@ void Vibrate(); #define LED_COLOR_ORDER RGB // USE GRB for the onboard led and RGB for the chain #define LED_BRIGHTNESS 96 +#define LED_BRIGHTNESS_DIMM 16 #define LED_FRAMES_PER_SECOND 24 #define LED_SETUP_DISPLAY_DELAY 500 @@ -193,8 +194,6 @@ void setup() { pinMode(VIBRO_PIN, OUTPUT); } - UpdatePalette(); - FastLED.setBrightness(LED_BRIGHTNESS); FastLED.addLeds(leds, LED_NUM_LEDS).setCorrection(TypicalLEDStrip); @@ -212,7 +211,9 @@ void setup() { FastLED.delay(LED_SETUP_DISPLAY_DELAY); fill_solid(leds, LED_NUM_LEDS, CRGB::Black ); - FastLED.show(); + FastLED.show(); + + UpdatePalette(); startindex = 0; updateTimer.set(UPDATE_INTERVAL, CleanDatabase); @@ -303,10 +304,12 @@ void UpdatePalette() { if (colors.empty()) { fill_solid(pal.entries, LED_PALETTE_SIZE, LED_DEFAULT_COLOR_ON); + FastLED.setBrightness(LED_BRIGHTNESS_DIMM); } else { for (int i=0; i