1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 15:03:07 +01:00

allow to control LEB brightness via config UI

This commit is contained in:
andreas
2023-10-14 13:44:13 +02:00
parent d1032bc231
commit 723713b69d
3 changed files with 21 additions and 5 deletions

View File

@@ -38,11 +38,7 @@ void handleLeds(void *param){
#else
FastLED.addLeds<GWLED_TYPE,GWLED_PIN>(leds,1);
#endif
#ifdef GWLED_BRIGHTNESS
uint8_t brightness=GWLED_BRIGHTNESS;
#else
uint8_t brightness=128; //50%
#endif
uint8_t brightness=api->getConfig()->getInt(GwConfigDefinitions::ledBrightness,128);
GwLedMode currentMode=mode;
leds[0]=colorFromMode(currentMode);
FastLED.setBrightness(brightness);