@@ -151,7 +151,7 @@ void WundergroundClient::key(String key) {
151151 isForecast = false ;
152152 isAlerts = true ;
153153 }
154- // end fowlerk add
154+ // end fowlerk add
155155}
156156
157157void WundergroundClient::value (String value) {
@@ -252,12 +252,12 @@ void WundergroundClient::value(String value) {
252252 if (currentKey == " observation_time_rfc822" ) {
253253 date = value.substring (0 , 16 );
254254 }
255- // Begin add, fowlerk...04-Dec-2016
255+ // Begin add, fowlerk...04-Dec-2016
256256 if (currentKey == " observation_time" ) {
257257 observationTime = value;
258258 }
259- // end add, fowlerk
260-
259+ // end add, fowlerk
260+
261261 if (currentKey == " temp_f" && !isMetric) {
262262 currentTemp = value;
263263 }
@@ -290,17 +290,17 @@ void WundergroundClient::value(String value) {
290290 if (currentKey == " feelslike_f" && !isMetric) {
291291 feelslike = value;
292292 }
293-
293+
294294 if (currentKey == " feelslike_c" && isMetric) {
295295 feelslike = value;
296296 }
297-
297+
298298 if (currentKey == " UV" ) {
299299 UV = value;
300300 }
301-
301+
302302 // end fowlerk add
303-
303+
304304 if (currentKey == " dewpoint_f" && !isMetric) {
305305 dewPoint = value;
306306 }
@@ -316,14 +316,10 @@ void WundergroundClient::value(String value) {
316316 if (currentKey == " period" ) {
317317 currentForecastPeriod = value.toInt ();
318318 }
319- if (currentKey == " pop" && isForecast && currentForecastPeriod < MAX_FORECAST_PERIODS) {
320- Serial.println (" Pop" + String (currentForecastPeriod) + " : " + value);
321- forecastPop[currentForecastPeriod] = value;
322- }
323319// Modified below line to add check to ensure we are processing the 10-day forecast
324320// before setting the forecastTitle (day of week of the current forecast day).
325321// (The keyword title is used in both the current observation and the 10-day forecast.)
326- // Modified by fowlerk
322+ // Modified by fowlerk
327323 // if (currentKey == "title" && currentForecastPeriod < MAX_FORECAST_PERIODS) { // Removed, fowlerk
328324 if (currentKey == " title" && isForecast && currentForecastPeriod < MAX_FORECAST_PERIODS) {
329325 Serial.println (String (currentForecastPeriod) + " : " + value);
@@ -335,7 +331,7 @@ void WundergroundClient::value(String value) {
335331 forecastText[currentForecastPeriod] = value;
336332 }
337333 // end fowlerk add, 12/3/16
338-
334+
339335 // The detailed forecast period has only one forecast per day with low/high for both
340336 // night and day, starting at index 1.
341337 int dailyForecastPeriod = (currentForecastPeriod - 1 ) * 2 ;
@@ -368,19 +364,19 @@ void WundergroundClient::value(String value) {
368364 currentForecastPeriod = 0 ;
369365 }
370366 forecastMonth[currentForecastPeriod] = value;
371- }
367+ }
372368
373369 if (currentKey == " day" && isSimpleForecast && currentForecastPeriod < MAX_FORECAST_PERIODS) {
374370 // Added by fowlerk to handle transition from txtforecast to simpleforecast, as
375371 // the key "period" doesn't appear until after some of the key values needed and is
376372 // used as an array index.
377373 if (isSimpleForecast && currentForecastPeriod == 19 ) {
378374 currentForecastPeriod = 0 ;
379- }
375+ }
380376 forecastDay[currentForecastPeriod] = value;
381377 }
382378 // end fowlerk add
383-
379+
384380}
385381
386382void WundergroundClient::endArray () {
@@ -547,24 +543,19 @@ String WundergroundClient::getForecastLowTemp(int period) {
547543String WundergroundClient::getForecastHighTemp (int period) {
548544 return forecastHighTemp[period];
549545}
550-
551- String WundergroundClient::getForecastPrecipitationPercentage (int period) {
552- return forecastPop[period];
553- }
554-
555546// fowlerk added...
556547String WundergroundClient::getForecastDay (int period) {
557- // Serial.print("Day period: "); Serial.println(period);
548+ // Serial.print("Day period: "); Serial.println(period);
558549 return forecastDay[period];
559550}
560551
561552String WundergroundClient::getForecastMonth (int period) {
562- // Serial.print("Month period: "); Serial.println(period);
553+ // Serial.print("Month period: "); Serial.println(period);
563554 return forecastMonth[period];
564555}
565556
566557String WundergroundClient::getForecastText (int period) {
567- Serial.print (" Forecast period: " ); Serial.println (period);
558+ Serial.print (" Forecast period: " ); Serial.println (period);
568559 return forecastText[period];
569560}
570561// end fowlerk add
0 commit comments