From a53baa9b421006129513ce7d79e0b315899ae391 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Thu, 19 Jun 2025 16:56:52 +0200 Subject: [PATCH] fix for https://github.com/wled/WLED/issues/4488 (#4692) virtual strip index is added even if strip is 1D. this change fixes FX using virtual strips not working when WLED_DISABLE_2D is used. --- wled00/FX_fcn.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 7d5158100..e7c27be10 100755 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -678,11 +678,9 @@ void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) const // check if this is a virtual strip #ifndef WLED_DISABLE_2D vStrip = i>>16; // hack to allow running on virtual strips (2D segment columns/rows) - i &= 0xFFFF; //truncate vstrip index - if (i >= vL) return; // if pixel would still fall out of segment just exit - #else - return; #endif + i &= 0xFFFF; // truncate vstrip index. note: vStrip index is 1 even in 1D, still need to truncate + if (i >= vL) return; // if pixel would still fall out of segment just exit } #ifndef WLED_DISABLE_2D