Skip to content

Commit 1e5b882

Browse files
fix: static background pattern brightness
1 parent 4e5aa4e commit 1e5b882

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wordclock_esp8266.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ void showStaticBackgroundPattern(){
12941294
uint8_t red = 0; // red color value (0-255)
12951295
uint8_t green = 255; // green color value (0-255)
12961296
uint8_t blue = 0; // blue color value (0-255)
1297-
uint8_t patternBrightness = 0.9 * brightness; // brightness of the pattern (0-255) // Nessi 0.7 entspricht 70%
1297+
uint8_t patternBrightness = 255; // brightness of the pattern (0-255) -> will be scaled by global brightness, example: brightness = 128 and patternBrightness = 180 -> resulting brightness = 90 (256 * 128/256 * 180/256)
12981298

12991299
if(patternBrightness < 10) patternBrightness = 10;
13001300
if(patternBrightness > 255) patternBrightness = 255;
@@ -1322,7 +1322,7 @@ void showStaticBackgroundPattern2(){
13221322
uint8_t red = 0; // red color value (0-255)
13231323
uint8_t green = 0; // green color value (0-255)
13241324
uint8_t blue = 255; // blue color value (0-255)
1325-
uint8_t patternBrightness = 0.9 * brightness; // brightness of the pattern (0-255) // Nessi 0.7 entspricht 70%
1325+
uint8_t patternBrightness = 255; // brightness of the pattern (0-255) -> will be scaled by global brightness, example: brightness = 128 and patternBrightness = 180 -> resulting brightness = 90 (256 * 128/256 * 180/256)
13261326

13271327
if(patternBrightness < 10) patternBrightness = 10;
13281328
if(patternBrightness > 255) patternBrightness = 255;

0 commit comments

Comments
 (0)