Skip to content

Commit 5eb3c3e

Browse files
author
Tobias
committed
- Added support for extracting windspeed in mph and km/h depending on isMetric
- Added unit in output of windspeed
1 parent b383a85 commit 5eb3c3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

WundergroundClient.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,12 @@ void WundergroundClient::value(String value) {
272272
}
273273
}
274274

275-
if (currentKey == "wind_mph") {
276-
windSpeed = value;
275+
if (currentKey == "wind_mph" && !isMetric) {
276+
windSpeed = value + "mph";
277+
}
278+
279+
if (currentKey == "wind_kph" && isMetric) {
280+
windSpeed = value + "km/h";
277281
}
278282

279283
if (currentKey == "wind_dir") {

0 commit comments

Comments
 (0)