Fix bug in parsing AQI_max / pollen_max
This commit is contained in:
parent
20557e019c
commit
dd69819f38
12
Claire.ino
12
Claire.ino
|
@ -173,11 +173,15 @@ void parseJson(String * payload)
|
||||||
n = n + 1;
|
n = n + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rainpickerData.AQI_max.time[0] = doc["AQI_max"]["time"];
|
if (doc.containsKey("AQI_max")) {
|
||||||
rainpickerData.AQI_max.value[0] = doc["AQI_max"]["value"];
|
rainpickerData.AQI_max.time[0] = doc["AQI_max"]["time"];
|
||||||
|
rainpickerData.AQI_max.value[0] = doc["AQI_max"]["value"];
|
||||||
|
}
|
||||||
|
|
||||||
rainpickerData.pollen_max.time[0] = doc["pollen"]["time"];
|
if (doc.containsKey("pollen_max")) {
|
||||||
rainpickerData.pollen_max.value[0] = doc["pollen"]["value"];
|
rainpickerData.pollen_max.time[0] = doc["pollen_max"]["time"];
|
||||||
|
rainpickerData.pollen_max.value[0] = doc["pollen_max"]["value"];
|
||||||
|
}
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
for (JsonObject elem : doc["UVI"].as<JsonArray>()) {
|
for (JsonObject elem : doc["UVI"].as<JsonArray>()) {
|
||||||
|
|
Loading…
Reference in New Issue