mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-21 12:01:47 +02:00
fix: dev: implemented different maxBrightness for the different colors
This commit is contained in:
parent
4be496759f
commit
a108625ca9
@ -93,11 +93,11 @@ uint32_t MultiColorLight::normalizeColor(uint32_t color,uint8_t maxBrightness){
|
||||
if (red > maxBrightness){
|
||||
red = maxBrightness;
|
||||
}
|
||||
if(green > maxBrightness){
|
||||
green = maxBrightness;
|
||||
if(green > maxBrightness-70){
|
||||
green = maxBrightness-70;
|
||||
}
|
||||
if(blue > maxBrightness){
|
||||
blue = maxBrightness;
|
||||
if(blue > maxBrightness-50){
|
||||
blue = maxBrightness-50;
|
||||
}
|
||||
return MultiColorLight::color(red,green,blue);
|
||||
}
|
@ -29,7 +29,7 @@ class MultiColorLight{
|
||||
protected:
|
||||
static const uint16_t ledAmount = 3;
|
||||
static const int16_t ledPin = 48;
|
||||
static const uint8_t maxBrightness = 100;
|
||||
static const uint8_t maxBrightness = 150;
|
||||
Adafruit_NeoPixel rgbLeds;
|
||||
public:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user