Skip to content

Commit 2ff90b9

Browse files
authored
Fix issue w/ windspeedmph in Weather Shield w/ GPS
I fixed the issue with the _windspeedmph_ in the _Weather_Shield_Weather_Station.ino_ example code [ [https://github.com/sparkfun/Weather_Shield/pull/25](https://github.com/sparkfun/Weather_Shield/pull/25) ]. However, this was also an issue with the _Weather_Shield_with_GPS.ino_ .
1 parent 865d3e0 commit 2ff90b9

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)