mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
less memory for boatData request
This commit is contained in:
@@ -55,7 +55,9 @@ String GwBoatData::toJson() const {
|
||||
count++;
|
||||
elementSizes+=it->second->getJsonSize();
|
||||
}
|
||||
DynamicJsonDocument json(JSON_OBJECT_SIZE(count)+elementSizes+10);
|
||||
int sz=JSON_OBJECT_SIZE(count)+elementSizes+10;
|
||||
LOG_DEBUG(GwLog::DEBUG,"size for boatData: %d",sz);
|
||||
DynamicJsonDocument json(sz);
|
||||
for (it=values.begin() ; it != values.end();it++){
|
||||
it->second->toJsonDoc(&json,minTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user