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.
pull/3380/head
Frank 2023-09-18 15:34:53 +02:00 zatwierdzone przez GitHub
rodzic 3260f46543
commit 555dd2e726
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -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--) {