From 555dd2e726f1e392649be6bd000f94e3f78e7e62 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:34:53 +0200 Subject: [PATCH] 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. --- wled00/FX.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 1abca885..f0d84c64 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -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--) {