Merge pull request #92 from jessebraham/gnss

Parse sentences with GNSS identifiers
This commit is contained in:
Limor "Ladyada" Fried 2019-06-14 17:13:34 -04:00 committed by GitHub
commit 2072e40b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ boolean Adafruit_GPS::parse(char *nmea) {
// look for a few common sentences
char *p = nmea;
if (strStartsWith(nmea, "$GPGGA")) {
if (strStartsWith(nmea, "$GPGGA") || strStartsWith(nmea, "$GNGGA")) {
// found GGA
// get time
p = strchr(p, ',')+1;
@ -135,7 +135,7 @@ boolean Adafruit_GPS::parse(char *nmea) {
return true;
}
if (strStartsWith(nmea, "$GPRMC")) {
if (strStartsWith(nmea, "$GPRMC") || strStartsWith(nmea, "$GNRMC")) {
// found RMC
// get time
p = strchr(p, ',')+1;
@ -183,7 +183,7 @@ boolean Adafruit_GPS::parse(char *nmea) {
return true;
}
if (strStartsWith(nmea, "$GPGLL")) {
if (strStartsWith(nmea, "$GPGLL") || strStartsWith(nmea, "$GNGLL")) {
// found GLL
// parse out latitude
p = strchr(p, ',')+1;