1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Added GNSS receiver fix messages

This commit is contained in:
Andrey Mironov 2018-08-10 13:52:50 +03:00
parent bf1c5729cc
commit efd7586841

View file

@ -703,12 +703,13 @@ static bool gpsNewFrameNMEA(char c)
string[offset] = 0; string[offset] = 0;
if (param == 0) { //frame identification if (param == 0) { //frame identification
gps_frame = NO_FRAME; 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; 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; 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; gps_frame = FRAME_GSV;
}
} }
switch (gps_frame) { switch (gps_frame) {