Fix corrupt PCAP with SD serial

This commit is contained in:
Just Call Me Koko
2023-10-14 16:06:05 -04:00
parent 33b5a6481c
commit 5f01e3030b
8 changed files with 120519 additions and 4 deletions

View File

@@ -6,11 +6,19 @@ char nmeaBuffer[100];
MicroNMEA nmea(nmeaBuffer, sizeof(nmeaBuffer));
HardwareSerial Serial2(GPS_SERIAL_INDEX);
#ifndef GPS_SOFTWARE_SERIAL
HardwareSerial Serial2(GPS_SERIAL_INDEX);
#else
EspSoftwareSerial::UART Serial2;
#endif
void GpsInterface::begin() {
Serial2.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);
#ifndef GPS_SOFTWARE_SERIAL
Serial2.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);
#else
Serial2.begin(9600, SWSERIAL_8N1, GPS_TX, GPS_RX);
#endif
MicroNMEA::sendSentence(Serial2, "$PSTMSETPAR,1201,0x00000042");
MicroNMEA::sendSentence(Serial2, "$PSTMSAVEPAR");