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