Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Bachschwell <[email protected]>
  • Loading branch information
s00500 committed Aug 26, 2020
1 parent 6506f6f commit cda1a57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/ESPUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ bool ESPUIClass::removeControl(uint16_t id, bool force_reload_ui)
}
else
{
jsonDom();
jsonDom(); // resends to all
}
return true;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion src/ESPUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class ESPUIClass
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;

Expand Down

0 comments on commit cda1a57

Please sign in to comment.