Skip to content

Commit 598e0bc

Browse files
committed
matrix: fix for a corner case (e.g. gapmaps)
workaround for a corner case; if the reference pixels falls into a "gap" then gPC returns BLACK. Solutions is to reject BLACK.
1 parent f1d4bf2 commit 598e0bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wled00/FX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,6 +5303,7 @@ uint16_t mode_2Dmatrix(void) { // Matrix2D. By Jeremy Williams.
53035303
oldSpawnColor = SEGMENT.getPixelColorXY(SEGENV.aux0, SEGENV.aux1); // find color of previous spawns
53045304
SEGENV.aux1 ++; // our sample pixel will be one row down the next time
53055305
}
5306+
if ((oldSpawnColor == CRGB::Black) || (oldSpawnColor == trailColor)) oldSpawnColor = spawnColor; // reject "black", as it would mean that ALL pixels create trails
53065307

53075308
// move pixels one row down. Falling codes keep color and add trail pixels; all others pixels are faded
53085309
for (int row=rows-1; row>=0; row--) {

0 commit comments

Comments
 (0)