Skip to content

Added dewpoint getter to WundergroundClient #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions WundergroundClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ void WundergroundClient::value(String value) {
if (currentKey == "pressure_in" && !isMetric) {
pressure = value + "in";
}
if (currentKey == "dewpoint_f" && !isMetric) {
dewPoint = value;
}
if (currentKey == "dewpoint_c" && isMetric) {
dewPoint = value;
}
if (currentKey == "precip_today_metric" && isMetric) {
precipitationToday = value + "mm";
}
Expand Down Expand Up @@ -252,6 +258,10 @@ String WundergroundClient::getPressure() {
return pressure;
}

String WundergroundClient::getDewPoint() {
return dewPoint;
}

String WundergroundClient::getPrecipitationToday() {
return precipitationToday;
}
Expand Down
3 changes: 3 additions & 0 deletions WundergroundClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class WundergroundClient: public JsonListener {
String weatherText;
String humidity;
String pressure;
String dewPoint;
String precipitationToday;
void doUpdate(String url);

Expand Down Expand Up @@ -78,6 +79,8 @@ class WundergroundClient: public JsonListener {

String getPressure();

String getDewPoint();

String getPrecipitationToday();

String getForecastIcon(int period);
Expand Down