Fixed no gamma correction for JSON individual LED control
This commit is contained in:
parent
3161f5fa47
commit
83753a5f81
@ -203,8 +203,12 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
|
|||||||
|
|
||||||
if (set < 2) stop = start + 1;
|
if (set < 2) stop = start + 1;
|
||||||
for (uint16_t i = start; i < stop; i++) {
|
for (uint16_t i = start; i < stop; i++) {
|
||||||
|
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]);
|
strip.setPixelColor(i, rgbw[0], rgbw[1], rgbw[2], rgbw[3]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!set) start++;
|
if (!set) start++;
|
||||||
set = 0;
|
set = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user