We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b65d87 commit 4abaf13Copy full SHA for 4abaf13
wled00/FX_fcn.cpp
@@ -989,7 +989,8 @@ void Segment::fade_out(uint8_t rate) const {
989
if (!isActive()) return; // not active
990
rate = (256-rate) >> 1;
991
const int mappedRate = 256 / (rate + 1);
992
- for (unsigned j = 0; j < vLength(); j++) {
+ const size_t length = is2D() ? (vWidth() * vHeight()) : vLength();
993
+ for (unsigned j = 0; j < length; j++) {
994
uint32_t color = getPixelColorRaw(j);
995
if (color == colors[1]) continue; // already at target color
996
for (int i = 0; i < 32; i += 8) {
0 commit comments