From de85ba90cb9ffbc2336bf674008a1084a5059392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Thu, 25 Feb 2021 11:20:31 +0100 Subject: [PATCH] Filter out BeiDou NMEA strings --- openrtx/src/gps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openrtx/src/gps.c b/openrtx/src/gps.c index a868b938..51db71d7 100644 --- a/openrtx/src/gps.c +++ b/openrtx/src/gps.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #define KNOTS2KMH 1.852f @@ -31,6 +31,12 @@ */ void gps_taskFunc(char *line, __attribute__((unused)) int len, state_t *state) { + char nmea_id[3] = { 0 }; + if (!minmea_talker_id(nmea_id, line)) + return; + // Discard BeiDou sentences as we currently don't support it + if (!strncmp(nmea_id, "BD", 3)) + return; switch (minmea_sentence_id(line, false)) { case MINMEA_SENTENCE_RMC: {