From 2b262dfbf1303d2fb110e3ece5c2b2420676eafd Mon Sep 17 00:00:00 2001 From: Lorenzosciacca <60114811+Lorenzosciacca@users.noreply.github.com> Date: Sat, 16 Dec 2023 16:29:20 +0100 Subject: [PATCH] bug fix --- src/apps/_experiments/OswAppWeather.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/apps/_experiments/OswAppWeather.cpp b/src/apps/_experiments/OswAppWeather.cpp index c8318d3d3..ce3ec9ade 100644 --- a/src/apps/_experiments/OswAppWeather.cpp +++ b/src/apps/_experiments/OswAppWeather.cpp @@ -163,9 +163,7 @@ String WeatherParser::encodeWeather(DynamicJsonDocument& doc) { update.weather = this->_getWCond(doc["list"][i]["weather"][0]["id"]); res = encoder.setUpdate(update); if (!res) { - OSW_LOG_I(i); - OSW_LOG_I("content"); - OSW_LOG_I(doc["list"][i]["main"]); + OSW_LOG_I("ERROR_INPUT" ); return "ERROR_INPUT" ; } } @@ -298,6 +296,7 @@ bool OswAppWeather::_request() { OswServiceAllTasks::wifi.disconnectWiFi(); OSW_LOG_I("Request returned code: ", code); if (code == 200) { + DynamicJsonDocument doc(16432); deserializeJson(doc,http.getStream()); WeatherParser pars; String encoded = pars.encodeWeather(doc); @@ -323,7 +322,7 @@ bool OswAppWeather::_request() { return true; } else { this->dataLoaded = false; - return false;6 + return false; } }