Realtime max. brightness now honors brightness factor (fixes #1271)

- Colorful effect now supports palettes
- Added C9 2 palette (#1291)
- Improved C9 palette brightness by 12%
- Disable onboard LED if LEDs are off (PR #1245)
- Added optional status LED (PR #1264)
- Realtime max. brightness now honors brightness factor (fixes #1271)
- Updated ArduinoJSON to 6.17.0
This commit is contained in:
cschwinne
2020-10-29 01:23:04 +01:00
parent 3b7f5a1397
commit 373d12be64
8 changed files with 66 additions and 41 deletions

View File

@@ -34,13 +34,20 @@ void toggleOnOff()
}
//scales the brightness with the briMultiplier factor
byte scaledBri(byte in)
{
uint32_t d = in*briMultiplier;
uint32_t val = d/100;
if (val > 255) val = 255;
return (byte)val;
}
void setAllLeds() {
if (!realtimeMode || !arlsForceMaxBri)
{
double d = briT*briMultiplier;
int val = d/100;
if (val > 255) val = 255;
strip.setBrightness(val);
strip.setBrightness(scaledBri(briT));
}
if (useRGBW && strip.rgbwMode == RGBW_MODE_LEGACY)
{