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.
This commit is contained in:
parent
3260f46543
commit
555dd2e726
@ -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
|
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
|
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
|
// 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--) {
|
for (int row=rows-1; row>=0; row--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user