bugfix for Ripple effect (1D mode) - solves #130

bounds check on "w" was not working.
This commit is contained in:
Frank
2024-04-22 18:20:18 +02:00
committed by GitHub
parent 6c93250cd8
commit 6e2bd77808

View File

@@ -2561,7 +2561,7 @@ uint16_t ripple_base()
if ((v >= 0) && (v < SEGLEN)) // WLEDMM bugfix: v and w can be negative or out-of-range
SEGMENT.setPixelColor(v, color_blend(SEGMENT.getPixelColor(v), col, mag)); // TODO
int w = left + propI*2 + 3 -(v-left);
if ((v >= 0) && (v < SEGLEN)) // WLEDMM bugfix: v and w can be negative or out-of-range
if ((w >= 0) && (w < SEGLEN)) // WLEDMM bugfix: v and w can be negative or out-of-range
SEGMENT.setPixelColor(w, color_blend(SEGMENT.getPixelColor(w), col, mag)); // TODO
}
}