Bugfix: saving LED settings not possible when brightness limiter disabled

--- and the "Maximum Current" field is empty or has a value below 250.
This commit is contained in:
Frank
2024-11-08 14:30:19 +01:00
parent 2e80d96400
commit 537638e5a2
3 changed files with 9 additions and 4 deletions

View File

@@ -244,8 +244,8 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
}
touchThreshold = request->arg(F("TT")).toInt();
strip.ablMilliampsMax = request->arg(F("MA")).toInt();
strip.milliampsPerLed = request->arg(F("LA")).toInt();
strip.ablMilliampsMax = max(0L, request->arg(F("MA")).toInt());
strip.milliampsPerLed = max(0L, request->arg(F("LA")).toInt());
briS = request->arg(F("CA")).toInt();