add gps toggle with g

pico-payload-gps
alanbjohnston 3 years ago committed by GitHub
parent 5111d0ae6b
commit df87990dcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -65,7 +65,7 @@ Adafruit_SI5351 clockgen = Adafruit_SI5351();
TinyGPS gps;
unsigned long micros3;
bool show_gps = false;
volatile int skip = 0;
//WiFiServer server(port);
@ -3010,6 +3010,9 @@ void payload_OK_only()
start_payload();
// setup();
}
else if (result == 'g') {
show_gps = !show_gps;
}
else if (result == 'C') {
Serial.println("Clearing stored gyro offsets in EEPROM\n");
EEPROM.put(0, (float)0.0);
@ -3102,7 +3105,8 @@ void payload_OK_only()
while (Serial2.available())
{
char c = Serial2.read();
// Serial.write(c); // uncomment this line if you want to see the GPS data flowing
if (show_gps)
Serial.write(c); // uncomment this line if you want to see the GPS data flowing
if (gps.encode(c)) // Did a new valid sentence come in?
newData = true;
}

Loading…
Cancel
Save

Powered by TurnKey Linux.