blur bugfix
turns out that fastLED 3.6.0 has an explicit uint32_t operator that returns RGBA, however 3.5.0 does not have this and the conversion returned only the "red" component".
This commit is contained in:
@@ -911,7 +911,7 @@ void Segment::blur(uint8_t blur_amount)
|
||||
{
|
||||
CRGB cur = CRGB(getPixelColor(i));
|
||||
CRGB part = cur;
|
||||
uint32_t before = uint32_t(cur); // remember color before blur
|
||||
CRGB before = cur; // remember color before blur
|
||||
part.nscale8(seep);
|
||||
cur.nscale8(keep);
|
||||
cur += carryover;
|
||||
@@ -922,7 +922,7 @@ void Segment::blur(uint8_t blur_amount)
|
||||
uint8_t b = B(c);
|
||||
setPixelColor((uint16_t)(i-1), qadd8(r, part.red), qadd8(g, part.green), qadd8(b, part.blue));
|
||||
}
|
||||
if (before != uint32_t(cur)) // optimization: only set pixel if color has changed
|
||||
if (before != cur) // optimization: only set pixel if color has changed
|
||||
setPixelColor((uint16_t)i,cur.red, cur.green, cur.blue);
|
||||
carryover = part;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user