Clear thisSentence and thisSource at start of each check
that way previous sentence identifiers won't bleed through on failure.
This commit is contained in:
parent
84eaad66e4
commit
deb312b293
|
|
@ -545,6 +545,7 @@ bool Adafruit_GPS::parse(char *nmea) {
|
|||
/**************************************************************************/
|
||||
boolean Adafruit_GPS::check(char *nmea) {
|
||||
thisCheck = 0; // new check
|
||||
*thisSentence = *thisSource = 0;
|
||||
if (*nmea != '$' && *nmea != '!')
|
||||
return false; // doesn't start with $ or !
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue