mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-21 20:11:46 +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){
|
if (red > maxBrightness){
|
||||||
red = maxBrightness;
|
red = maxBrightness;
|
||||||
}
|
}
|
||||||
if(green > maxBrightness){
|
if(green > maxBrightness-70){
|
||||||
green = maxBrightness;
|
green = maxBrightness-70;
|
||||||
}
|
}
|
||||||
if(blue > maxBrightness){
|
if(blue > maxBrightness-50){
|
||||||
blue = maxBrightness;
|
blue = maxBrightness-50;
|
||||||
}
|
}
|
||||||
return MultiColorLight::color(red,green,blue);
|
return MultiColorLight::color(red,green,blue);
|
||||||
}
|
}
|
@ -29,7 +29,7 @@ class MultiColorLight{
|
|||||||
protected:
|
protected:
|
||||||
static const uint16_t ledAmount = 3;
|
static const uint16_t ledAmount = 3;
|
||||||
static const int16_t ledPin = 48;
|
static const int16_t ledPin = 48;
|
||||||
static const uint8_t maxBrightness = 100;
|
static const uint8_t maxBrightness = 150;
|
||||||
Adafruit_NeoPixel rgbLeds;
|
Adafruit_NeoPixel rgbLeds;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user