Skip to content

Commit 18d91f5

Browse files
committed
Added dewpoint getter to WundergroundClient
1 parent 9f104f1 commit 18d91f5

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
@@ -136,6 +136,12 @@ void WundergroundClient::value(String value) {
136136
if (currentKey == "pressure_in" && !isMetric) {
137137
pressure = value + "in";
138138
}
139+
if (currentKey == "dewpoint_f" && !isMetric) {
140+
dewPoint = value;
141+
}
142+
if (currentKey == "dewpoint_c" && isMetric) {
143+
dewPoint = value;
144+
}
139145
if (currentKey == "precip_today_metric" && isMetric) {
140146
precipitationToday = value + "mm";
141147
}
@@ -252,6 +258,10 @@ String WundergroundClient::getPressure() {
252258
return pressure;
253259
}
254260

261+
String WundergroundClient::getDewPoint() {
262+
return dewPoint;
263+
}
264+
255265
String WundergroundClient::getPrecipitationToday() {
256266
return precipitationToday;
257267
}

WundergroundClient.h

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class WundergroundClient: public JsonListener {
4444
String weatherText;
4545
String humidity;
4646
String pressure;
47+
String dewPoint;
4748
String precipitationToday;
4849
void doUpdate(String url);
4950

@@ -78,6 +79,8 @@ class WundergroundClient: public JsonListener {
7879

7980
String getPressure();
8081

82+
String getDewPoint();
83+
8184
String getPrecipitationToday();
8285

8386
String getForecastIcon(int period);

0 commit comments

Comments
 (0)