From 8ff0223520edf4cc934a734ce7e9880b61c32fa2 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:59:13 +0100 Subject: [PATCH] GEQ flat mode for 2D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit you still have to use a trick -> the "expand 1D" drop-down is hidden once you select a 2D-capable effect * Create your segment with 2 colums or 2 rows (might also need "transpose" * Select a 1D effect like chunchun * set expand to "Pixels" or "Bar" * now select the GEQ effect --> Flat GEQ runs in the previously set expand mode. --- wled00/FX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 37c0b8e8be..838f763c33 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -8122,7 +8122,7 @@ static void setFlatPixelXY(bool flatMode, int x, int y, uint32_t color, unsigned uint16_t mode_2DGEQ(void) { // By Will Tatam. Code reduction by Ewoud Wijma. Flat Mode added by softhack007 //if (!strip.isMatrix) return mode_static(); // not a 2D set-up, not a problem - bool flatMode = !SEGMENT.is2D(); + bool flatMode = !SEGMENT.is2D() || (SEGMENT.width() < 3) || (SEGMENT.height() < 3); // also use flat mode when less than 3 colums or rows const int NUM_BANDS = map2(SEGMENT.custom1, 0, 255, 1, 16); const int vLength = SEGLEN; // for flat mode