Skip to content

Commit

Permalink
v3.1.1
Browse files Browse the repository at this point in the history
Minor change to historical rain and snow json parse
  • Loading branch information
JHershey69 authored Aug 20, 2021
1 parent d76181f commit 3753402
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/OpenWeatherOneCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ int OpenWeatherOneCall::createHistory()
{
if(USER_PARAM.OPEN_WEATHER_UNITS == 2)
{
float temp = current["rain"];
float temp = current["rain"]["1h"];
history[0].rainVolume = (temp/25.4); // 95
}
else
history[0].rainVolume = current["rain"]; // 95
history[0].rainVolume = current["rain"]["1h"]; // 95

}

Expand All @@ -545,11 +545,11 @@ int OpenWeatherOneCall::createHistory()
{
if(USER_PARAM.OPEN_WEATHER_UNITS == 2)
{
float temp = current["snow"];
float temp = current["snow"]["1h"];
history[0].snowVolume = (temp/25.4); // 95
}
else
history[0].rainVolume = current["snow"]; // 95
history[0].rainVolume = current["snow"]["1h"]; // 95

}

Expand Down Expand Up @@ -617,11 +617,11 @@ int OpenWeatherOneCall::createHistory()
{
if(USER_PARAM.OPEN_WEATHER_UNITS == 2)
{
float temp = hourly_0["rain"];
float temp = hourly_0["rain"]["1h"];
history[x].rainVolume = (temp/25.4); // 95
}
else
history[x].rainVolume = hourly_0["rain"]; // 95
history[x].rainVolume = hourly_0["rain"]["1h"]; // 95

}

Expand All @@ -630,11 +630,11 @@ int OpenWeatherOneCall::createHistory()
{
if(USER_PARAM.OPEN_WEATHER_UNITS == 2)
{
float temp = hourly_0["snow"];
float temp = hourly_0["snow"]["1h"];
history[x].snowVolume = (temp/25.4); // 95
}
else
history[x].snowVolume = hourly_0["snow"]; // 95
history[x].snowVolume = hourly_0["snow"]["1h"]; // 95

}

Expand Down

0 comments on commit 3753402

Please sign in to comment.