mirror of
https://github.com/s00500/ESPUI.git
synced 2025-11-27 18:03:15 +00:00
Compare commits
1 Commits
master
...
time-retri
| Author | SHA1 | Date | |
|---|---|---|---|
|
aed06457b3
|
@@ -207,6 +207,20 @@ void Control::onWsEvent(String & cmd, String& data)
|
||||
do // once
|
||||
{
|
||||
// Serial.println(String(F("Control::onWsEvent")));
|
||||
|
||||
// Handle time response separately - it should not mark the control as changed
|
||||
// because it's a one-shot response to an updateTime() request, not a state change
|
||||
// that needs to be broadcast to other clients
|
||||
if (cmd.equals(F("time")))
|
||||
{
|
||||
if (HasCallback())
|
||||
{
|
||||
value = data;
|
||||
SendCallback(TM_VALUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
SetControlChangedId(ESPUI.GetNextControlChangeId());
|
||||
if (!HasCallback())
|
||||
{
|
||||
@@ -317,12 +331,6 @@ void Control::onWsEvent(String & cmd, String& data)
|
||||
// updateControl(c, client->id());
|
||||
SendCallback(S_VALUE);
|
||||
}
|
||||
else if (cmd.equals(F("time")))
|
||||
{
|
||||
value = data;
|
||||
// updateControl(c, client->id());
|
||||
SendCallback(TM_VALUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(DEBUG_ESPUI)
|
||||
|
||||
Reference in New Issue
Block a user