add support for multi GNSS solutions
authorJohn Crispin <john@phrozen.org>
Sat, 19 Jun 2021 13:46:02 +0000 (15:46 +0200)
committerJohn Crispin <john@phrozen.org>
Sat, 19 Jun 2021 13:46:50 +0000 (15:46 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
nmea.c

diff --git a/nmea.c b/nmea.c
index 8e6160632f59b91f18be298d4192b24699258e63..e86f68f1f8242bfe1b1ef55b28031727cf128f16 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -316,7 +316,8 @@ nmea_process(char *a)
        int cnt;
        unsigned int i;
 
-       if (strncmp(a, "$GP", 3))
+       if (strncmp(a, "$GP", 3) &&
+           strncmp(a, "$GN", 3))
                return;
 
        a++;
@@ -336,7 +337,8 @@ nmea_process(char *a)
        }
 
        for (i = 0; i < ARRAY_SIZE(nmea_msgs); i++) {
-               if (strcmp(nmea_params[0].str, nmea_msgs[i].msg))
+               if (strcmp(nmea_params[0].str, nmea_msgs[i].msg) &&
+                   strcmp(nmea_params[3].str, nmea_msgs[i].msg))
                        continue;
                if (nmea_msgs[i].cnt <= cnt)
                        nmea_msgs[i].handler();