Skip to content

Commit d588fa1

Browse files
authored
Merge pull request #28 from bboyho/master
Fix issue w/ windspeedmph in Weather Shield w/ GPS
2 parents 865d3e0 + 2ff90b9 commit d588fa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

firmware/Weather_Shield_with_GPS/Weather_Shield_with_GPS.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ void loop()
190190

191191
//Calc the wind speed and direction every second for 120 second to get 2 minute average
192192
float currentSpeed = get_wind_speed();
193+
windspeedmph = currentSpeed; //update global variable for windspeed when using the printWeather() function
193194
//float currentSpeed = random(5); //For testing
194195
int currentDirection = get_wind_direction();
195196
windspdavg[seconds_2m] = (int)currentSpeed;
@@ -249,7 +250,7 @@ void calcWeather()
249250
winddir = get_wind_direction();
250251

251252
//Calc windspeed
252-
//windspeedmph = get_wind_speed(); //This is calculated in the main loop
253+
//windspeedmph = get_wind_speed(); //This is calculated in the main loop on line 193
253254

254255
//Calc windgustmph
255256
//Calc windgustdir
@@ -463,4 +464,3 @@ void printWeather()
463464

464465
}
465466

466-

0 commit comments

Comments
 (0)