Skip to content

The shortest NMEA sentence can be less than 32 #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lesamouraipourpre opened this issue Feb 25, 2021 · 2 comments · Fixed by #62
Closed

The shortest NMEA sentence can be less than 32 #56

lesamouraipourpre opened this issue Feb 25, 2021 · 2 comments · Fixed by #62

Comments

@lesamouraipourpre
Copy link
Contributor

Currently in _read_sentence() the code waits for at least 32 bytes before processing

def _read_sentence(self):
    # Only continue if we have at least 32 bytes in the input buffer
    if self.in_waiting < 32:
        return None

The shortest sentence I can find referenced in a datasheet is 15 bytes long:
$PMTK501,2*28<CR><LF>

I can find no definitive shortest sentence, but theoretically, there could be a sentence 11 bytes long:
$XXXXX*ZZ<CR><LF>
where the talker/sentence_type or proprietary_message is the message and needs no extra data.

@ladyada
Copy link
Member

ladyada commented Feb 27, 2021

sure if ya like you can submit a PR to shorten it to 11 bytes, not that it isnt a 'minimum sentence' length thing, since usually multiple sentences get emitted at once.

@jposada202020
Copy link

@lesamouraipourpre now that changes were, was this fixed? let me know thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants