From afe9cff16445ae50fd0b91fd4cb3c63b7de46f06 Mon Sep 17 00:00:00 2001 From: vdBrink Date: Tue, 23 Aug 2022 22:45:42 +0200 Subject: [PATCH 1/2] getMember is remove from ArduinoJson 6.20 --- PlatformIO/src/General.hpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/PlatformIO/src/General.hpp b/PlatformIO/src/General.hpp index 785cbeb..be5c204 100644 --- a/PlatformIO/src/General.hpp +++ b/PlatformIO/src/General.hpp @@ -496,20 +496,20 @@ void loadConfiguration(const char *filename, Config &config) { } else { serializeJsonPretty(doc, Serial); Serial.println(); - config.siteid = doc.getMember("siteid").as(); - config.mqtt_host = doc.getMember("mqtt_host").as(); - config.mqtt_port = doc.getMember("mqtt_port").as(); - config.mqtt_user = doc.getMember("mqtt_user").as(); - config.mqtt_pass = doc.getMember("mqtt_pass").as(); - config.mute_input = doc.getMember("mute_input").as(); - config.mute_output = doc.getMember("mute_output").as(); - config.amp_output = doc.getMember("amp_output").as(); - config.brightness = doc.getMember("brightness").as(); - config.hotword_brightness = doc.getMember("hotword_brightness").as(); - config.hotword_detection = doc.getMember("hotword_detection").as(); - config.volume = doc.getMember("volume").as(); - config.gain = doc.getMember("gain").as(); - config.animation = doc.getMember("animation").as(); + config.siteid = doc["siteid"].as(); + config.mqtt_host = doc["mqtt_host"].as(); + config.mqtt_port = doc["mqtt_port"].as(); + config.mqtt_user = doc["mqtt_user"].as(); + config.mqtt_pass = doc["mqtt_pass"].as(); + config.mute_input = doc["mute_input"].as(); + config.mute_output = doc["mute_output"].as(); + config.amp_output = doc["amp_output"].as(); + config.brightness = doc["brightness"].as(); + config.hotword_brightness = doc["hotword_brightness"].as(); + config.hotword_detection = doc["hotword_detection"].as(); + config.volume = doc["volume"].as(); + config.gain = doc["gain"].as(); + config.animation = doc["animation"].as(); // apply configuration values device->ampOutput(config.amp_output); From 64ed990dbb0c29d25c8860fe2d587d2496156a7d Mon Sep 17 00:00:00 2001 From: vdBrink Date: Tue, 30 Aug 2022 21:09:14 +0200 Subject: [PATCH 2/2] set ArduinoJson to latest fixed version --- PlatformIO/platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlatformIO/platformio.ini b/PlatformIO/platformio.ini index c5a5345..11b439f 100644 --- a/PlatformIO/platformio.ini +++ b/PlatformIO/platformio.ini @@ -33,7 +33,7 @@ lib_deps = https://github.com/marvinroger/async-mqtt-client.git https://github.com/me-no-dev/AsyncTCP.git https://github.com/knolleary/pubsubclient.git - https://github.com/bblanchon/ArduinoJson.git + https://github.com/bblanchon/ArduinoJson.git @ ^6.19.4 ESP Async WebServer m5stack/M5Atom fastled/FastLED