Fixed preset immediately deselecting when set via HTTP API PL=
This commit is contained in:
parent
c879351063
commit
5903e8256f
@ -552,13 +552,6 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply)
|
|||||||
DEBUG_PRINTLN(req);
|
DEBUG_PRINTLN(req);
|
||||||
|
|
||||||
strip.applyToAllSelected = false;
|
strip.applyToAllSelected = false;
|
||||||
//snapshot to check if request changed values later, temporary.
|
|
||||||
byte prevCol[4] = {col[0], col[1], col[2], col[3]};
|
|
||||||
byte prevColSec[4] = {colSec[0], colSec[1], colSec[2], colSec[3]};
|
|
||||||
byte prevEffect = effectCurrent;
|
|
||||||
byte prevSpeed = effectSpeed;
|
|
||||||
byte prevIntensity = effectIntensity;
|
|
||||||
byte prevPalette = effectPalette;
|
|
||||||
|
|
||||||
//segment select (sets main segment)
|
//segment select (sets main segment)
|
||||||
byte prevMain = strip.getMainSegmentId();
|
byte prevMain = strip.getMainSegmentId();
|
||||||
@ -625,6 +618,14 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply)
|
|||||||
applyPreset(presetCycCurr);
|
applyPreset(presetCycCurr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//snapshot to check if request changed values later, temporary.
|
||||||
|
byte prevCol[4] = {col[0], col[1], col[2], col[3]};
|
||||||
|
byte prevColSec[4] = {colSec[0], colSec[1], colSec[2], colSec[3]};
|
||||||
|
byte prevEffect = effectCurrent;
|
||||||
|
byte prevSpeed = effectSpeed;
|
||||||
|
byte prevIntensity = effectIntensity;
|
||||||
|
byte prevPalette = effectPalette;
|
||||||
|
|
||||||
//set brightness
|
//set brightness
|
||||||
updateVal(&req, "&A=", &bri);
|
updateVal(&req, "&A=", &bri);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user