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" #include "utils.h"
Configuration Config; Configuration Config;
HardwareSerial neo6m_gps(1); HardwareSerial gpsSerial(1);
TinyGPSPlus gps; TinyGPSPlus gps;
#ifdef HAS_BT_CLASSIC #ifdef HAS_BT_CLASSIC
BluetoothSerial SerialBT; BluetoothSerial SerialBT;

View File

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