@@ -151,7 +151,7 @@ void WundergroundClient::key(String key) {
151
151
isForecast = false ;
152
152
isAlerts = true ;
153
153
}
154
- // end fowlerk add
154
+ // end fowlerk add
155
155
}
156
156
157
157
void WundergroundClient::value (String value) {
@@ -252,12 +252,12 @@ void WundergroundClient::value(String value) {
252
252
if (currentKey == " observation_time_rfc822" ) {
253
253
date = value.substring (0 , 16 );
254
254
}
255
- // Begin add, fowlerk...04-Dec-2016
255
+ // Begin add, fowlerk...04-Dec-2016
256
256
if (currentKey == " observation_time" ) {
257
257
observationTime = value;
258
258
}
259
- // end add, fowlerk
260
-
259
+ // end add, fowlerk
260
+
261
261
if (currentKey == " temp_f" && !isMetric) {
262
262
currentTemp = value;
263
263
}
@@ -290,17 +290,17 @@ void WundergroundClient::value(String value) {
290
290
if (currentKey == " feelslike_f" && !isMetric) {
291
291
feelslike = value;
292
292
}
293
-
293
+
294
294
if (currentKey == " feelslike_c" && isMetric) {
295
295
feelslike = value;
296
296
}
297
-
297
+
298
298
if (currentKey == " UV" ) {
299
299
UV = value;
300
300
}
301
-
301
+
302
302
// end fowlerk add
303
-
303
+
304
304
if (currentKey == " dewpoint_f" && !isMetric) {
305
305
dewPoint = value;
306
306
}
@@ -316,14 +316,10 @@ void WundergroundClient::value(String value) {
316
316
if (currentKey == " period" ) {
317
317
currentForecastPeriod = value.toInt ();
318
318
}
319
- if (currentKey == " pop" && isForecast && currentForecastPeriod < MAX_FORECAST_PERIODS) {
320
- Serial.println (" Pop" + String (currentForecastPeriod) + " : " + value);
321
- forecastPop[currentForecastPeriod] = value;
322
- }
323
319
// Modified below line to add check to ensure we are processing the 10-day forecast
324
320
// before setting the forecastTitle (day of week of the current forecast day).
325
321
// (The keyword title is used in both the current observation and the 10-day forecast.)
326
- // Modified by fowlerk
322
+ // Modified by fowlerk
327
323
// if (currentKey == "title" && currentForecastPeriod < MAX_FORECAST_PERIODS) { // Removed, fowlerk
328
324
if (currentKey == " title" && isForecast && currentForecastPeriod < MAX_FORECAST_PERIODS) {
329
325
Serial.println (String (currentForecastPeriod) + " : " + value);
@@ -335,7 +331,7 @@ void WundergroundClient::value(String value) {
335
331
forecastText[currentForecastPeriod] = value;
336
332
}
337
333
// end fowlerk add, 12/3/16
338
-
334
+
339
335
// The detailed forecast period has only one forecast per day with low/high for both
340
336
// night and day, starting at index 1.
341
337
int dailyForecastPeriod = (currentForecastPeriod - 1 ) * 2 ;
@@ -368,19 +364,19 @@ void WundergroundClient::value(String value) {
368
364
currentForecastPeriod = 0 ;
369
365
}
370
366
forecastMonth[currentForecastPeriod] = value;
371
- }
367
+ }
372
368
373
369
if (currentKey == " day" && isSimpleForecast && currentForecastPeriod < MAX_FORECAST_PERIODS) {
374
370
// Added by fowlerk to handle transition from txtforecast to simpleforecast, as
375
371
// the key "period" doesn't appear until after some of the key values needed and is
376
372
// used as an array index.
377
373
if (isSimpleForecast && currentForecastPeriod == 19 ) {
378
374
currentForecastPeriod = 0 ;
379
- }
375
+ }
380
376
forecastDay[currentForecastPeriod] = value;
381
377
}
382
378
// end fowlerk add
383
-
379
+
384
380
}
385
381
386
382
void WundergroundClient::endArray () {
@@ -547,24 +543,19 @@ String WundergroundClient::getForecastLowTemp(int period) {
547
543
String WundergroundClient::getForecastHighTemp (int period) {
548
544
return forecastHighTemp[period];
549
545
}
550
-
551
- String WundergroundClient::getForecastPrecipitationPercentage (int period) {
552
- return forecastPop[period];
553
- }
554
-
555
546
// fowlerk added...
556
547
String WundergroundClient::getForecastDay (int period) {
557
- // Serial.print("Day period: "); Serial.println(period);
548
+ // Serial.print("Day period: "); Serial.println(period);
558
549
return forecastDay[period];
559
550
}
560
551
561
552
String WundergroundClient::getForecastMonth (int period) {
562
- // Serial.print("Month period: "); Serial.println(period);
553
+ // Serial.print("Month period: "); Serial.println(period);
563
554
return forecastMonth[period];
564
555
}
565
556
566
557
String WundergroundClient::getForecastText (int period) {
567
- Serial.print (" Forecast period: " ); Serial.println (period);
558
+ Serial.print (" Forecast period: " ); Serial.println (period);
568
559
return forecastText[period];
569
560
}
570
561
// end fowlerk add
0 commit comments