This commit is contained in:
Blaž Kristan 2024-10-07 17:15:35 +02:00
parent 407477dc68
commit 5e9a46d54d
3 changed files with 2 additions and 5 deletions

View File

@ -465,7 +465,6 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
ps = presetCycCurr;
if (root["win"].isNull() && getVal(root["ps"], &ps, 0, 0) && ps > 0 && ps < 251 && ps != currentPreset) {
// b) preset ID only or preset that does not change state (use embedded cycling limits if they exist in getVal())
presetCycCurr = ps;
applyPreset(ps, callMode); // async load from file system (only preset ID was specified)
return stateResponse;
}

View File

@ -118,7 +118,7 @@ void initPresetsFile()
bool applyPresetFromPlaylist(byte index)
{
DEBUG_PRINTF_P(PSTR("Request to apply preset: %d\n"), index);
presetToApply = index;
presetToApply = presetCycCurr = index;
callModeToApply = CALL_MODE_DIRECT_CHANGE;
return true;
}
@ -127,7 +127,7 @@ bool applyPreset(byte index, byte callMode)
{
unloadPlaylist(); // applying a preset unloads the playlist (#3827)
DEBUG_PRINTF_P(PSTR("Request to apply preset: %u\n"), index);
presetToApply = index;
presetToApply = presetCycCurr = index;
callModeToApply = callMode;
return true;
}

View File

@ -316,8 +316,6 @@ WLED_GLOBAL bool rlyOpenDrain _INIT(RLYODRAIN);
constexpr uint8_t hardwareTX = 1;
#endif
//WLED_GLOBAL byte presetToApply _INIT(0);
WLED_GLOBAL char ntpServerName[33] _INIT("0.wled.pool.ntp.org"); // NTP server to use
// WiFi CONFIG (all these can be changed via web UI, no need to set them here)