Skip to content

Commit 3e12096

Browse files
authored
Merge pull request #21 from count023/adding_wundergroundClient_getDewPoint
Added dewpoint getter to WundergroundClient. Thanks @count023!
2 parents 5dcb991 + 18d91f5 commit 3e12096

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

WundergroundClient.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ void WundergroundClient::value(String value) {
238238
if (currentKey == "pressure_in" && !isMetric) {
239239
pressure = value + "in";
240240
}
241+
if (currentKey == "dewpoint_f" && !isMetric) {
242+
dewPoint = value;
243+
}
244+
if (currentKey == "dewpoint_c" && isMetric) {
245+
dewPoint = value;
246+
}
241247
if (currentKey == "precip_today_metric" && isMetric) {
242248
precipitationToday = value + "mm";
243249
}
@@ -394,6 +400,10 @@ String WundergroundClient::getPressure() {
394400
return pressure;
395401
}
396402

403+
String WundergroundClient::getDewPoint() {
404+
return dewPoint;
405+
}
406+
397407
String WundergroundClient::getPrecipitationToday() {
398408
return precipitationToday;
399409
}

WundergroundClient.h

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class WundergroundClient: public JsonListener {
5555
String weatherText;
5656
String humidity;
5757
String pressure;
58+
String dewPoint;
5859
String precipitationToday;
5960
void doUpdate(String url);
6061

@@ -101,6 +102,8 @@ class WundergroundClient: public JsonListener {
101102

102103
String getPressure();
103104

105+
String getDewPoint();
106+
104107
String getPrecipitationToday();
105108

106109
String getForecastIcon(int period);

0 commit comments

Comments
 (0)