Skip to content

Commit 21afb05

Browse files
authored
Merge pull request wled#4077 from adrianschroeter/0_15
2DGEQ: Getting same sized bar width on 32x32 display, and better distribution of bar width in general.
2 parents 42decbd + 343d766 commit 21afb05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wled00/FX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7456,7 +7456,7 @@ uint16_t mode_2DGEQ(void) { // By Will Tatam. Code reduction by Ewoud Wijma.
74567456
if ((fadeoutDelay <= 1 ) || ((SEGENV.call % fadeoutDelay) == 0)) SEGMENT.fadeToBlackBy(SEGMENT.speed);
74577457

74587458
for (int x=0; x < cols; x++) {
7459-
uint8_t band = map(x, 0, cols-1, 0, NUM_BANDS - 1);
7459+
uint8_t band = map(x, 0, cols, 0, NUM_BANDS);
74607460
if (NUM_BANDS < 16) band = map(band, 0, NUM_BANDS - 1, 0, 15); // always use full range. comment out this line to get the previous behaviour.
74617461
band = constrain(band, 0, 15);
74627462
unsigned colorIndex = band * 17;

0 commit comments

Comments
 (0)