Merge pull request #4077 from adrianschroeter/0_15

2DGEQ: Getting same sized bar width on 32x32 display, and better distribution of bar width in general.
This commit is contained in:
Frank 2024-07-28 17:35:08 +02:00 committed by GitHub
commit 21afb05409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7456,7 +7456,7 @@ uint16_t mode_2DGEQ(void) { // By Will Tatam. Code reduction by Ewoud Wijma.
if ((fadeoutDelay <= 1 ) || ((SEGENV.call % fadeoutDelay) == 0)) SEGMENT.fadeToBlackBy(SEGMENT.speed);
for (int x=0; x < cols; x++) {
uint8_t band = map(x, 0, cols-1, 0, NUM_BANDS - 1);
uint8_t band = map(x, 0, cols, 0, NUM_BANDS);
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.
band = constrain(band, 0, 15);
unsigned colorIndex = band * 17;