mirror of
https://github.com/s00500/ESPUI.git
synced 2025-11-28 04:13:16 +00:00
Added a client transfer context for use by the control marshaling function
This commit is contained in:
@@ -307,7 +307,7 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex,
|
||||
|
||||
JsonObject item = items.createNestedObject();
|
||||
elementcount++;
|
||||
control->MarshalControl(item, InUpdateMode);
|
||||
control->MarshalControl(item, InUpdateMode, ClientTransferContext);
|
||||
|
||||
if (rootDoc.overflowed())
|
||||
{
|
||||
@@ -315,6 +315,7 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex,
|
||||
if (1 == elementcount)
|
||||
{
|
||||
Serial.println(String(F("ERROR: prepareJSONChunk: Control ")) + String(control->id) + F(" is too large to be sent to the browser."));
|
||||
// Serial.println(String(F("ERROR: prepareJSONChunk: value: ")) + control->value);
|
||||
rootDoc.clear();
|
||||
item = items.createNestedObject();
|
||||
control->MarshalErrorMessage(item);
|
||||
@@ -330,7 +331,6 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex,
|
||||
}
|
||||
// exit the loop
|
||||
control = nullptr;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user