From 8d0224c6c9ea9091565d325bd7ce3a8eaf957563 Mon Sep 17 00:00:00 2001 From: Bas Rijniersce Date: Sat, 2 Nov 2019 17:46:55 -0700 Subject: [PATCH] Removed the accidental code duplication for --- Adafruit_GPS.cpp | 73 ------------------------------------------------ 1 file changed, 73 deletions(-) diff --git a/Adafruit_GPS.cpp b/Adafruit_GPS.cpp index dc8893d..b1551af 100755 --- a/Adafruit_GPS.cpp +++ b/Adafruit_GPS.cpp @@ -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