1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-22 04:00:55 +00:00
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
This commit is contained in:
Lukas Bachschwell 2020-08-26 22:00:20 +02:00
parent 6506f6fe1c
commit cda1a573d6
Signed by: lbsadmin
GPG Key ID: CCC6AA87CC8DF425
2 changed files with 6 additions and 7 deletions

View File

@ -563,7 +563,7 @@ bool ESPUIClass::removeControl(uint16_t id, bool force_reload_ui)
}
else
{
jsonDom();
jsonDom(); // resends to all
}
return true;
}
@ -670,6 +670,10 @@ void ESPUIClass::updateControl(Control *control, int clientId)
if (clientId < 0)
{
if (this->verbosity >= Verbosity::VerboseJSON)
{
Serial.println("TextAll");
}
this->ws->textAll(json);
return;
}
@ -684,11 +688,6 @@ void ESPUIClass::updateControl(Control *control, int clientId)
if (clientId != tryId)
{
this->ws->client(tryId)->text(json);
if (this->verbosity >= Verbosity::VerboseJSON)
{
Serial.println(json);
}
}
count++;

View File

@ -256,7 +256,7 @@ public:
const char *ui_title = "ESPUI"; // Store UI Title and Header Name
Control *controls = nullptr;
void jsonReload();
void jsonDom(AsyncWebSocketClient *client);
void jsonDom(AsyncWebSocketClient *client = nullptr);
Verbosity verbosity;