change into gpsSerial for neutral gps call

This commit is contained in:
richonguzman 2024-10-07 17:34:15 -03:00
parent c3d300ce37
commit fd176e7171
2 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ ________________________________________________________________________________
#include "utils.h"
Configuration Config;
HardwareSerial neo6m_gps(1);
HardwareSerial gpsSerial(1);
TinyGPSPlus gps;
#ifdef HAS_BT_CLASSIC
BluetoothSerial SerialBT;

View File

@ -19,7 +19,7 @@
#endif
extern Configuration Config;
extern HardwareSerial neo6m_gps; // cambiar a gpsSerial
extern HardwareSerial gpsSerial;
extern TinyGPSPlus gps;
extern Beacon *currentBeacon;
extern logging::Logger logger;
@ -55,7 +55,7 @@ namespace GPS_Utils {
digitalWrite(GPS_VCC, LOW);
delay(200);
#endif
neo6m_gps.begin(GPS_BAUD, SERIAL_8N1, GPS_TX, GPS_RX);
gpsSerial.begin(GPS_BAUD, SERIAL_8N1, GPS_TX, GPS_RX);
}
void calculateDistanceCourse(const String& callsign, double checkpointLatitude, double checkPointLongitude) {
@ -67,8 +67,8 @@ namespace GPS_Utils {
void getData() {
if (disableGPS) return;
while (neo6m_gps.available() > 0) {
gps.encode(neo6m_gps.read());
while (gpsSerial.available() > 0) {
gps.encode(gpsSerial.read());
}
}