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) {