Fix for #2880 (stateChanged on segment on/off)

Added comments.
Added X1, X2, X3, M1, M2, M3 segment options to HTTP API.
Added "on" handling with "ps".
This commit is contained in:
Blaz Kristan
2022-11-13 12:13:49 +01:00
parent 50875d5759
commit b141ec7ea7
6 changed files with 52 additions and 33 deletions

View File

@@ -344,6 +344,7 @@ uint8_t gamma8_cal(uint8_t b, float gamma)
return (int)(powf((float)b / 255.0f, gamma) * 255.0f + 0.5f);
}
// re-calculates & fills gamma table
void calcGammaTable(float gamma)
{
for (uint16_t i = 0; i < 256; i++) {
@@ -351,11 +352,13 @@ void calcGammaTable(float gamma)
}
}
// used for individual channel or brightness gamma correction
uint8_t gamma8(uint8_t b)
{
return gammaT[b];
}
// used for color gamma correction
uint32_t gamma32(uint32_t color)
{
if (!gammaCorrectCol) return color;