Fancy up the scroll
This commit is contained in:
1 parent
e8e16bdb8b
commit
32689e6f35
1 file changed
+4
-2
+4
-2
@@ -194,8 +194,10 @@ bool fetchWeatherData() {
|
||||
DynamicJsonDocument doc(1024);
|
||||
|
||||
if (!deserializeJson(doc, payload)) {
|
||||
weatherState = doc["weather"][0]["description"].as<String>();
|
||||
capitalizeFirstLetter(const_cast<char*>(weatherState.c_str()));
|
||||
String mainWeather = doc["weather"][0]["main"].as<String>();
|
||||
String description = doc["weather"][0]["description"].as<String>();
|
||||
capitalizeFirstLetter(const_cast<char*>(description.c_str()));
|
||||
weatherState = mainWeather + " " + description;
|
||||
temperature = doc["main"]["temp"].as<float>() - 273.15;
|
||||
humidity = doc["main"]["humidity"];
|
||||
pressure = doc["main"]["pressure"].as<float>() / 1000;
|
||||
|
||||
Reference in new issue
Block a user