memory improvement: dropped static gamma table

- there already is a method to calculate the table on the fly, there is no need to store it in flash, it can just be calculated at bootup (or cfg change)
This commit is contained in:
Damian Schneider
2024-09-14 14:10:46 +02:00
parent 2afff05014
commit 6a37f25c5d
3 changed files with 9 additions and 26 deletions

View File

@@ -319,13 +319,12 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
gammaCorrectBri = request->hasArg(F("GB"));
gammaCorrectCol = request->hasArg(F("GC"));
gammaCorrectVal = request->arg(F("GV")).toFloat();
if (gammaCorrectVal > 1.0f && gammaCorrectVal <= 3)
NeoGammaWLEDMethod::calcGammaTable(gammaCorrectVal);
else {
if (gammaCorrectVal <= 1.0f || gammaCorrectVal > 3) {
gammaCorrectVal = 1.0f; // no gamma correction
gammaCorrectBri = false;
gammaCorrectCol = false;
}
NeoGammaWLEDMethod::calcGammaTable(gammaCorrectVal); // fill look-up table
fadeTransition = request->hasArg(F("TF"));
modeBlending = request->hasArg(F("EB"));