Removed the accidental code duplication for

This commit is contained in:
Bas Rijniersce 2019-11-02 17:46:55 -07:00
parent ebde856657
commit 8d0224c6c9
1 changed files with 0 additions and 73 deletions

View File

@ -204,79 +204,6 @@ boolean Adafruit_GPS::parse(char *nmea) {
return true;
}
if (strStartsWith(nmea, "$GPRMC") || strStartsWith(nmea, "$GNRMC")) {
// found RMC
// get time
p = strchr(p, ',')+1;
parseTime(p);
// fix or no fix
p = strchr(p, ',')+1;
if(!parseFix(p)) return false;
// parse out latitude
p = strchr(p, ',')+1;
parseLat(p);
p = strchr(p, ',')+1;
if(!parseLatDir(p)) return false;
// parse out longitude
p = strchr(p, ',')+1;
parseLon(p);
p = strchr(p, ',')+1;
if(!parseLonDir(p)) return false;
// speed
p = strchr(p, ',')+1;
if (',' != *p)
{
speed = atof(p);
}
// angle
p = strchr(p, ',')+1;
if (',' != *p)
{
angle = atof(p);
}
p = strchr(p, ',')+1;
if (',' != *p)
{
uint32_t fulldate = atof(p);
day = fulldate / 10000;
month = (fulldate % 10000) / 100;
year = (fulldate % 100);
lastDate = sentTime;
}
return true;
}
if (strStartsWith(nmea, "$GPGLL") || strStartsWith(nmea, "$GNGLL")) {
// found GLL
// parse out latitude
p = strchr(p, ',')+1;
parseLat(p);
p = strchr(p, ',')+1;
if(!parseLatDir(p)) return false;
// parse out longitude
p = strchr(p, ',')+1;
parseLon(p);
p = strchr(p, ',')+1;
if(!parseLonDir(p)) return false;
// get time
p = strchr(p, ',')+1;
parseTime(p);
// fix or no fix
p = strchr(p, ',')+1;
if(!parseFix(p)) return false;
return true;
}
if (strStartsWith(nmea, "$GPGSA")) {
// found GSA
// parse out Auto selection, but ignore them