Display invalid GPS info more often
parent
2d43f48874
commit
82914e52be
|
@ -106,6 +106,8 @@ void batt_read(void);
|
|||
void writedisplaytext(String, String, String, String, String, String, int);
|
||||
void setup_data(void);
|
||||
|
||||
void displayInvalidGPS();
|
||||
|
||||
// SoftwareSerial ss(RXPin, TXPin); // The serial connection to the GPS device
|
||||
HardwareSerial gpsSerial(1); // TTGO has HW serial
|
||||
TinyGPSPlus gps; // The TinyGPS++ object
|
||||
|
@ -475,6 +477,19 @@ void loop() {
|
|||
digitalWrite(TXLED, LOW);
|
||||
#endif
|
||||
} else {
|
||||
displayInvalidGPS();
|
||||
}
|
||||
|
||||
}else{
|
||||
if (gps.location.age() < 2000) {
|
||||
writedisplaytext(" "+Tcall,"Time to TX: "+String(((lastTX+nextTX)-millis())/1000)+"sec","LAT: "+LatShown,"LON: "+LongShown,"SPD: "+String(gps.speed.kmph(),1)+" CRS: "+String(gps.course.deg(),1),"SAT: "+String(gps.satellites.value()) + " BAT: "+String(BattVolts,1) +"V",1);
|
||||
} else {
|
||||
displayInvalidGPS();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void displayInvalidGPS() {
|
||||
writedisplaytext(" " + Tcall, "(TX) at valid GPS", "LAT: not valid", "LON: not valid", "SPD: --- CRS: ---", "SAT: " + String(gps.satellites.value()) + " BAT: " + String(BattVolts, 1) + "V", 1);
|
||||
#ifdef SHOW_GPS_DATA
|
||||
Serial.print("(TX) at valid GPS / LAT: not valid / Lon: not valid / SPD: --- / CRS: ---");
|
||||
|
@ -485,11 +500,4 @@ void loop() {
|
|||
#endif
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
if (gps.location.age() < 2000) {
|
||||
writedisplaytext(" "+Tcall,"Time to TX: "+String(((lastTX+nextTX)-millis())/1000)+"sec","LAT: "+LatShown,"LON: "+LongShown,"SPD: "+String(gps.speed.kmph(),1)+" CRS: "+String(gps.course.deg(),1),"SAT: "+String(gps.satellites.value()) + " BAT: "+String(BattVolts,1) +"V",1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// end of main loop
|
Loading…
Reference in New Issue