Synchronus applyPreset() from HTTP JSON API call.

Bugfix for HTTP API preset.
WS multiple broadcast fix.
Turning segment on/off will not reset currentPreset/cause stateChanged.
This commit is contained in:
Blaz Kristan
2022-04-16 16:28:43 +02:00
parent f915201a27
commit 0f6b1e4ae1
6 changed files with 83 additions and 62 deletions

View File

@@ -171,17 +171,14 @@ void updateInterfaces(uint8_t callMode)
callMode != CALL_MODE_NO_NOTIFY) updateBlynk();
#endif
doPublishMqtt = true;
interfaceUpdateCallMode = 0; //disable
}
void handleTransitions()
{
//handle still pending interface update
if (interfaceUpdateCallMode && millis() - lastInterfaceUpdate > INTERFACE_UPDATE_COOLDOWN)
{
updateInterfaces(interfaceUpdateCallMode);
interfaceUpdateCallMode = 0; //disable
}
if (interfaceUpdateCallMode && millis() - lastInterfaceUpdate > INTERFACE_UPDATE_COOLDOWN) updateInterfaces(interfaceUpdateCallMode);
if (doPublishMqtt) publishMqtt();
if (transitionActive && transitionDelayTemp > 0)