Skip to content

Commit

Permalink
fix VE.Direct live data response size
Browse files Browse the repository at this point in the history
PLLIMIT would not (always) be part of the JSON string transmitted to the
web application and trip it. with the help of the ArduinoJson assistant,
new values to use in the response size calculation were introduced.
also, importantly, a constant offset was added for the DPL status and
the JSON structure sourrounding the MPPTs.
  • Loading branch information
schlimmchen committed Mar 23, 2024
1 parent 1c51c2d commit 0154da9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WebApi_ws_vedirect_live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ bool WebApiWsVedirectLiveClass::hasUpdate(size_t idx)

uint16_t WebApiWsVedirectLiveClass::responseSize() const
{
return VictronMppt.controllerAmount() * (1024 + 128);
// estimated with ArduinoJson assistant
return VictronMppt.controllerAmount() * (1024 + 512) + 128/*DPL status and structure*/;
}

void WebApiWsVedirectLiveClass::sendDataTaskCb()
Expand Down

0 comments on commit 0154da9

Please sign in to comment.