mirror of
https://github.com/wled/WLED.git
synced 2025-04-24 23:07:19 +00:00
Fix for #4154
This commit is contained in:
parent
407477dc68
commit
5e9a46d54d
@ -465,7 +465,6 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
|
|||||||
ps = presetCycCurr;
|
ps = presetCycCurr;
|
||||||
if (root["win"].isNull() && getVal(root["ps"], &ps, 0, 0) && ps > 0 && ps < 251 && ps != currentPreset) {
|
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())
|
// 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)
|
applyPreset(ps, callMode); // async load from file system (only preset ID was specified)
|
||||||
return stateResponse;
|
return stateResponse;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ void initPresetsFile()
|
|||||||
bool applyPresetFromPlaylist(byte index)
|
bool applyPresetFromPlaylist(byte index)
|
||||||
{
|
{
|
||||||
DEBUG_PRINTF_P(PSTR("Request to apply preset: %d\n"), index);
|
DEBUG_PRINTF_P(PSTR("Request to apply preset: %d\n"), index);
|
||||||
presetToApply = index;
|
presetToApply = presetCycCurr = index;
|
||||||
callModeToApply = CALL_MODE_DIRECT_CHANGE;
|
callModeToApply = CALL_MODE_DIRECT_CHANGE;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ bool applyPreset(byte index, byte callMode)
|
|||||||
{
|
{
|
||||||
unloadPlaylist(); // applying a preset unloads the playlist (#3827)
|
unloadPlaylist(); // applying a preset unloads the playlist (#3827)
|
||||||
DEBUG_PRINTF_P(PSTR("Request to apply preset: %u\n"), index);
|
DEBUG_PRINTF_P(PSTR("Request to apply preset: %u\n"), index);
|
||||||
presetToApply = index;
|
presetToApply = presetCycCurr = index;
|
||||||
callModeToApply = callMode;
|
callModeToApply = callMode;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -316,8 +316,6 @@ WLED_GLOBAL bool rlyOpenDrain _INIT(RLYODRAIN);
|
|||||||
constexpr uint8_t hardwareTX = 1;
|
constexpr uint8_t hardwareTX = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//WLED_GLOBAL byte presetToApply _INIT(0);
|
|
||||||
|
|
||||||
WLED_GLOBAL char ntpServerName[33] _INIT("0.wled.pool.ntp.org"); // NTP server to use
|
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)
|
// WiFi CONFIG (all these can be changed via web UI, no need to set them here)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user