mirror of
https://github.com/espressif/esp-rainmaker.git
synced 2026-01-15 12:25:30 +00:00
The node config and node params JSON were limited by the size specified in config options, since the JSON generator required pre-allocated buffer. Now that the JSON generator gives a facility of finding out the total length required to create the JSON, this config based limitation could be removed. ESP_RMAKER_MAX_NODE_CONFIG_SIZE has been removed and instead, the required node config size is dynamically computed and allocated. ESP_RMAKER_MAX_PARAM_DATA_SIZE has still been retained and used as the default size of params JSON, since params sizes keep on changing and it is best to not keep re-allocating buffers. However, if the required size exceeds the current max size, the node params buffer is re-allocated. Similar logic has also been used in schedules JSON and the default max scheduled count has been increased from 5 to 10, since higher number of schedules can no more cause buffer overflow issues.