Skip to content

Commit a53baa9

Browse files
authored
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.
1 parent 7eafc01 commit a53baa9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

wled00/FX_fcn.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,9 @@ void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) const
678678
// check if this is a virtual strip
679679
#ifndef WLED_DISABLE_2D
680680
vStrip = i>>16; // hack to allow running on virtual strips (2D segment columns/rows)
681-
i &= 0xFFFF; //truncate vstrip index
682-
if (i >= vL) return; // if pixel would still fall out of segment just exit
683-
#else
684-
return;
685681
#endif
682+
i &= 0xFFFF; // truncate vstrip index. note: vStrip index is 1 even in 1D, still need to truncate
683+
if (i >= vL) return; // if pixel would still fall out of segment just exit
686684
}
687685

688686
#ifndef WLED_DISABLE_2D

0 commit comments

Comments
 (0)