Skip to content

Commit

Permalink
handle * as end of sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
wertarbyte committed Feb 25, 2012
1 parent d9a93da commit 50a9883
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nmea.c
Expand Up @@ -215,6 +215,11 @@ static void sentence_finished(void) {
default:
break;
}
/* since we processed the entire sentence, everything following until
* the next $ is considered garbage;
* (there might be a checksum - which we ignore)
*/
sentence = GP_UNKNOWN;
}

static void token_finished(void) {
Expand Down Expand Up @@ -259,9 +264,9 @@ void nmea_process_character(char c) {
sentence_started();
break;
case ',':
case '*': /* the checksum is following, but we ignore it */
token_finished();
break;
case '*': /* the checksum is following, but we ignore it */
case '\n':
token_finished();
sentence_finished();
Expand Down

0 comments on commit 50a9883

Please sign in to comment.