SignalK / SensESP

Universal Signal K sensor framework for the ESP32 platform
https://signalk.org/SensESP/
Apache License 2.0
153 stars 81 forks source link

Increase the configuration object json buffer sizes #572

Closed mairas closed 2 years ago

mairas commented 2 years ago

Larger configuration objects could overrun the rather limited JSON configuration object buffer sizes in the HTTP server code. This was an issue for CurveInterpolator in particular. Those buffer sizes have now been increased.

The fix is taken almost as-is from the code provided by Bjarne Hansen in Issue #415. Only defining DYNAMIC_JSON_DOCUMENT_SIZE didn't work because the related headers were included earlier on during compilation. But luckily, AsyncCallbackJsonWebHandler constructor accepts the maximum buffer size as a constructor argument.

I've tested this with https://github.com/hatlabs/SH-ESP32-engine-hat-firmware with CurveInterpolators up to over 20 samples.

Fixes #415.