From: John Crispin Date: Sat, 19 Jun 2021 13:46:02 +0000 (+0200) Subject: add support for multi GNSS solutions X-Git-Url: http://git.openwrt.org/source?a=commitdiff_plain;h=350b960b6f8b08409dcef719ef1e1e0c8911040f;p=project%2Fugps.git add support for multi GNSS solutions Signed-off-by: John Crispin --- diff --git a/nmea.c b/nmea.c index 8e61606..e86f68f 100644 --- 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();