Merge pull request #1864 from blazoncek/ledmap-multisegment-fix

Ledmap multisegment fix.
pull/1873/head
Aircoookie 2021-04-06 12:03:45 +02:00 zatwierdzone przez GitHub
commit 6ae743684f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -192,14 +192,14 @@ void WS2812FX::setPixelColor(uint16_t i, byte r, byte g, byte b, byte w)
for (uint16_t j = 0; j < SEGMENT.grouping; j++) {
int indexSet = realIndex + (reversed ? -j : j);
if (indexSet < customMappingSize) indexSet = customMappingTable[indexSet];
if (indexSet >= SEGMENT.start && indexSet < SEGMENT.stop) {
busses.setPixelColor(indexSet + skip, col);
if (IS_MIRROR) { //set the corresponding mirrored pixel
uint16_t indexMir = SEGMENT.stop - indexSet + SEGMENT.start - 1;
if (indexMir < customMappingSize) indexMir = customMappingTable[indexMir];
busses.setPixelColor(indexMir + skip, col);
}
if (indexSet < customMappingSize) indexSet = customMappingTable[indexSet];
busses.setPixelColor(indexSet + skip, col);
}
}
} else { //live data, etc.