Merge branch 'xiaoxiang781216-max'

This commit is contained in:
Kosma Moczek 2022-08-04 11:35:56 +01:00
commit a3813b8449
2 changed files with 2 additions and 6 deletions

View File

@ -46,10 +46,6 @@ bool minmea_check(const char *sentence, bool strict)
{
uint8_t checksum = 0x00;
// Sequence length is limited.
if (strlen(sentence) > MINMEA_MAX_SENTENCE_LENGTH + 3)
return false;
// A valid sentence starts with "$".
if (*sentence++ != '$')
return false;

View File

@ -18,6 +18,8 @@
static const char *valid_sentences_nochecksum[] = {
"$GPTXT,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"$GPTXT,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"$GPTXT,hello\n",
"$GPTXT,hello\r",
"$GPTXT,hello\r\n",
@ -51,8 +53,6 @@ static const char *valid_sentences_checksum[] = {
};
static const char *invalid_sentences[] = {
"$GPTXT,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"$GPTXT,01,01,02,ANTSTATUS=INIT*26",
"$GPRMC,,V,,,,,,,,,,N*532",
"$GPVTG,,,,\xff,,,,,N*30",