diff --git a/config.h b/config.h index 8f3284e..1497867 100644 --- a/config.h +++ b/config.h @@ -5,6 +5,6 @@ // framing for serial data //#define SERIAL_FRAMING SERIAL_FRAMING_KISS #define SERIAL_FRAMING SERIAL_FRAMING_NMEA -#define NMEA_SKIP_SENTENCES 5 +#define NMEA_SKIP_SENTENCES 0 #endif \ No newline at end of file diff --git a/protocol/KISS.c b/protocol/KISS.c index 02abf20..487423e 100644 --- a/protocol/KISS.c +++ b/protocol/KISS.c @@ -112,7 +112,7 @@ void kiss_serialCallback(uint8_t sbyte) { if (!IN_FRAME) { // This is the start of a frame, so // we init filter data ($GPRMC) - strncpy((char*)serialBuffer, "$GPRMC", 6); + strncpy((char*)serialBuffer, "$GPGGA", 6); } serialBuffer[frame_len++] = sbyte; @@ -120,9 +120,9 @@ void kiss_serialCallback(uint8_t sbyte) { if (serialBuffer[0] != '$') NMEA_ok = false; if (serialBuffer[1] != 'G') NMEA_ok = false; if (serialBuffer[2] != 'P') NMEA_ok = false; - if (serialBuffer[3] != 'R') NMEA_ok = false; - if (serialBuffer[4] != 'M') NMEA_ok = false; - if (serialBuffer[5] != 'C') NMEA_ok = false; + if (serialBuffer[3] != 'G') NMEA_ok = false; + if (serialBuffer[4] != 'G') NMEA_ok = false; + if (serialBuffer[5] != 'A') NMEA_ok = false; if (NMEA_ok) { // Continue