Skip to content

Commit 865d3e0

Browse files
author
Toni Klopfenstein
authored
Merge pull request #25 from bboyho/master
Fixed output for windspeedmph and gps longitude
2 parents 4c92106 + 32ddf27 commit 865d3e0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

firmware/Weather_Shield_Weather_Station/Weather_Shield_Weather_Station.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ void loop()
176176

177177
//Calc the wind speed and direction every second for 120 second to get 2 minute average
178178
float currentSpeed = get_wind_speed();
179+
windspeedmph = currentSpeed; //update global variable for windspeed when using the printWeather() function
179180
//float currentSpeed = random(5); //For testing
180181
int currentDirection = get_wind_direction();
181182
windspdavg[seconds_2m] = (int)currentSpeed;
@@ -223,7 +224,7 @@ void calcWeather()
223224
winddir = get_wind_direction();
224225

225226
//Calc windspeed
226-
//windspeedmph = get_wind_speed(); //This is calculated in the main loop
227+
//windspeedmph = get_wind_speed(); //This is calculated in the main loop on line 179
227228

228229
//Calc windgustmph
229230
//Calc windgustdir

firmware/Weather_Shield_with_GPS/Weather_Shield_with_GPS.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void printWeather()
442442

443443
Serial.print(",lat=");
444444
Serial.print(gps.location.lat(), 6);
445-
Serial.print(",lat=");
445+
Serial.print(",lng=");
446446
Serial.print(gps.location.lng(), 6);
447447
Serial.print(",altitude=");
448448
Serial.print(gps.altitude.meters());

0 commit comments

Comments
 (0)