Hi,
NMEA 4.1 appends an extra field to the RMC message. We're not
interested in it's value, but we do want to accept the new format.
Tested to work on a nav module enabled for Galileo info (which
requires NMEA 4.1).
OK?
-Otto
Index: tty_nmea.c
===================================================================
RCS file: /cvs/src/sys/kern/tty_nmea.c,v
retrieving revision 1.48
diff -u -p -r1.48 tty_nmea.c
--- tty_nmea.c 26 Jan 2019 22:51:13 -0000 1.48
+++ tty_nmea.c 15 Aug 2019 11:27:22 -0000
@@ -336,7 +336,7 @@ nmea_gprmc(struct nmea *np, struct tty *
int64_t date_nano, time_nano, nmea_now;
int jumped = 0;
- if (fldcnt != 12 && fldcnt != 13) {
+ if (fldcnt < 12 || fldcnt > 14) {
DPRINTF(("gprmc: field count mismatch, %d\n", fldcnt));
return;
}
@@ -373,9 +373,9 @@ nmea_gprmc(struct nmea *np, struct tty *
np->time.tv.tv_sec = np->ts.tv_sec;
np->time.tv.tv_usec = np->ts.tv_nsec / 1000L;
- if (fldcnt != 13)
+ if (fldcnt < 13)
strlcpy(np->time.desc, "GPS", sizeof(np->time.desc));
- else if (fldcnt == 13 && *fld[12] != np->mode) {
+ else if (*fld[12] != np->mode) {
np->mode = *fld[12];
switch (np->mode) {
case 'S':