Fixed no gamma correction for JSON individual LED control

pull/2328/head
cschwinne 2021-11-09 17:50:29 +01:00
rodzic 3161f5fa47
commit 83753a5f81
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -203,7 +203,11 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
if (set < 2) stop = start + 1;
for (uint16_t i = start; i < stop; i++) {
strip.setPixelColor(i, rgbw[0], rgbw[1], rgbw[2], rgbw[3]);
if (strip.gammaCorrectCol) {
strip.setPixelColor(i, strip.gamma8(rgbw[0]), strip.gamma8(rgbw[1]), strip.gamma8(rgbw[2]), strip.gamma8(rgbw[3]));
} else {
strip.setPixelColor(i, rgbw[0], rgbw[1], rgbw[2], rgbw[3]);
}
}
if (!set) start++;
set = 0;