ArduinoJSON 6.8.0-beta

- ArduinoJSON 6.8.0-beta
- Update version_info
This commit is contained in:
Debashish Sahu 2019-02-11 17:31:12 -05:00
parent f82e944d5d
commit 652ff236f6
4 changed files with 9 additions and 8 deletions

View file

@ -53,8 +53,8 @@
#endif #endif
#ifdef ARDUINOJSON_VERSION #ifdef ARDUINOJSON_VERSION
#if !(ARDUINOJSON_VERSION_MAJOR == 6 and ARDUINOJSON_VERSION_MINOR == 7) #if !(ARDUINOJSON_VERSION_MAJOR == 6 and ARDUINOJSON_VERSION_MINOR == 8)
#error "Install ArduinoJson v6.7.0-beta" #error "Install ArduinoJson v6.8.0-beta"
#endif #endif
#endif #endif
@ -548,7 +548,7 @@ void setup() {
}, handleFileUpload); }, handleFileUpload);
//get heap status, analog input value and all GPIO statuses in one json call //get heap status, analog input value and all GPIO statuses in one json call
server.on("/esp_status", HTTP_GET, []() { server.on("/esp_status", HTTP_GET, []() {
DynamicJsonDocument jsonBuffer; DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(21) + 1500);
JsonObject json = jsonBuffer.to<JsonObject>(); JsonObject json = jsonBuffer.to<JsonObject>();
json["HOSTNAME"] = HOSTNAME; json["HOSTNAME"] = HOSTNAME;
@ -805,7 +805,7 @@ void setup() {
#endif #endif
} }
DynamicJsonDocument jsonBuffer; DynamicJsonDocument jsonBuffer(200);
JsonObject json = jsonBuffer.to<JsonObject>(); JsonObject json = jsonBuffer.to<JsonObject>();
json["pixel_pount"] = WS2812FXStripSettings.stripSize; json["pixel_pount"] = WS2812FXStripSettings.stripSize;
json["rgb_order"] = WS2812FXStripSettings.RGBOrder; json["rgb_order"] = WS2812FXStripSettings.RGBOrder;

View file

@ -1275,7 +1275,7 @@ bool writeConfigFS(bool saveConfig){
//FS save //FS save
updateFS = true; updateFS = true;
DBG_OUTPUT_PORT.print("Saving config: "); DBG_OUTPUT_PORT.print("Saving config: ");
DynamicJsonDocument jsonBuffer; DynamicJsonDocument jsonBuffer(200);
JsonObject json = jsonBuffer.to<JsonObject>(); JsonObject json = jsonBuffer.to<JsonObject>();
json["mqtt_host"] = mqtt_host; json["mqtt_host"] = mqtt_host;
json["mqtt_port"] = mqtt_port; json["mqtt_port"] = mqtt_port;
@ -1344,7 +1344,7 @@ bool writeStateFS(){
updateFS = true; updateFS = true;
//save the strip state to FS JSON //save the strip state to FS JSON
DBG_OUTPUT_PORT.print("Saving cfg: "); DBG_OUTPUT_PORT.print("Saving cfg: ");
DynamicJsonDocument jsonBuffer; DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(7)+200);
JsonObject json = jsonBuffer.to<JsonObject>(); JsonObject json = jsonBuffer.to<JsonObject>();
json["mode"] = static_cast<int>(mode); json["mode"] = static_cast<int>(mode);
json["strip_mode"] = (int) strip->getMode(); json["strip_mode"] = (int) strip->getMode();
@ -1492,7 +1492,7 @@ void writeStripConfigFS(void){
updateFS = true; updateFS = true;
//save the strip config to FS JSON //save the strip config to FS JSON
DBG_OUTPUT_PORT.print("Saving cfg: "); DBG_OUTPUT_PORT.print("Saving cfg: ");
DynamicJsonDocument jsonBuffer; DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(4)+300);
JsonObject json = jsonBuffer.to<JsonObject>(); JsonObject json = jsonBuffer.to<JsonObject>();
json["pixel_pount"] = WS2812FXStripSettings.stripSize; json["pixel_pount"] = WS2812FXStripSettings.stripSize;
json["rgb_order"] = WS2812FXStripSettings.RGBOrder; json["rgb_order"] = WS2812FXStripSettings.RGBOrder;

View file

@ -69,4 +69,5 @@
* - new "REST API": /pixels?ct=xxx to change length of LED strip * - new "REST API": /pixels?ct=xxx to change length of LED strip
* - new "REST API": /pixels?rgbo=xxx to change RGB order * - new "REST API": /pixels?rgbo=xxx to change RGB order
* - new "REST API": /pixels?pin=GPIO_NO to change PIN# (Allowed GPIO values: 16/5/4/0/2/14/12/13/15/3/1) * - new "REST API": /pixels?pin=GPIO_NO to change PIN# (Allowed GPIO values: 16/5/4/0/2/14/12/13/15/3/1)
* - added HA 0.87 version support https://github.com/toblum/McLighting/issues/327
*/ */

View file

@ -37,7 +37,7 @@ upload_resetmethod = nodemcu
lib_deps = lib_deps =
WiFiManager@0.14 WiFiManager@0.14
AsyncMqttClient AsyncMqttClient
https://github.com/bblanchon/ArduinoJson.git#v6.7.0-beta https://github.com/bblanchon/ArduinoJson.git#v6.8.0-beta
WS2812FX WS2812FX
NeoPixelBus@2.4.1 NeoPixelBus@2.4.1
WebSockets WebSockets