Skip to content

Commit

Permalink
matrix: fix for a corner case (e.g. gapmaps)
Browse files Browse the repository at this point in the history
workaround for a corner case; if the reference pixels falls into a "gap" then gPC returns BLACK. Solutions is to reject BLACK.
  • Loading branch information
softhack007 authored Sep 18, 2023
1 parent 3260f46 commit 555dd2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5207,6 +5207,7 @@ uint16_t mode_2Dmatrix(void) { // Matrix2D. By Jeremy Williams.
oldSpawnColor = SEGMENT.getPixelColorXY(SEGENV.aux0, SEGENV.aux1); // find color of previous spawns
SEGENV.aux1 ++; // our sample pixel will be one row down the next time
}
if ((oldSpawnColor == CRGB::Black) || (oldSpawnColor == trailColor)) oldSpawnColor = spawnColor; // reject "black", as it would mean that ALL pixels create trails

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

0 comments on commit 555dd2e

Please sign in to comment.