mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 22:37:18 +00:00
BUGFIX in oscillate FX (#4494)
effect was changed from int to uint but it relied on negative numbers. fixed by checking overflow and a cast.
This commit is contained in:
parent
edc6022441
commit
1bf13ea525
@ -1809,7 +1809,7 @@ uint16_t mode_oscillate(void) {
|
||||
uint32_t color = BLACK;
|
||||
for (unsigned j = 0; j < numOscillators; j++) {
|
||||
if((int)i >= (int)oscillators[j].pos - oscillators[j].size && i <= oscillators[j].pos + oscillators[j].size) {
|
||||
color = (color == BLACK) ? SEGCOLOR(j) : color_blend(color, SEGCOLOR(j), 128);
|
||||
color = (color == BLACK) ? SEGCOLOR(j) : color_blend(color, SEGCOLOR(j), uint8_t(128));
|
||||
}
|
||||
}
|
||||
SEGMENT.setPixelColor(i, color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user