mirror of
https://github.com/markqvist/MicroModemGP
synced 2026-08-12 17:40:37 -04:00
Changed to GPGGA sentence
This commit is contained in:
parent
244915d8e8
commit
31e9332bad
2 changed files with 5 additions and 5 deletions
2
config.h
2
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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue