From efd7586841f767d6a34b4c71f9da48b0ce32fcc9 Mon Sep 17 00:00:00 2001 From: Andrey Mironov Date: Fri, 10 Aug 2018 13:52:50 +0300 Subject: [PATCH] Added GNSS receiver fix messages --- src/main/io/gps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index a0aca1f34..edd1853e1 100644 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -703,12 +703,13 @@ static bool gpsNewFrameNMEA(char c) string[offset] = 0; if (param == 0) { //frame identification gps_frame = NO_FRAME; - if (string[0] == 'G' && string[1] == 'P' && string[2] == 'G' && string[3] == 'G' && string[4] == 'A') + if (0 == strcmp(string, "GPGGA") || 0 == strcmp(string, "GNGGA")) { gps_frame = FRAME_GGA; - if (string[0] == 'G' && string[1] == 'P' && string[2] == 'R' && string[3] == 'M' && string[4] == 'C') + } else if (0 == strcmp(string, "GPRMC") || 0 == strcmp(string, "GNRMC")) { gps_frame = FRAME_RMC; - if (string[0] == 'G' && string[1] == 'P' && string[2] == 'G' && string[3] == 'S' && string[4] == 'V') + } else if (0 == strcmp(string, "GPGSV")) { gps_frame = FRAME_GSV; + } } switch (gps_frame) {