Skip to content
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

mavlink_helpers.h: Don't restart parsing on second CRC byte #897

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomerg-flytrex
Copy link

If an unknown message is received it would fail parsing due to bad CRC, thanks to the crc_extra. Before this change the parser would restart parsing on the second CRC byte. This can cause the parser to be out of sync and drop messages if the second CRC byte happens to be MAVLINK_STX.
Now the parser will ignore the MAVLINK_STX if it was received as the second byte of a bad CRC message.

Fixes #881

If an unknown message is received it would fail parsing due
to bad CRC, thanks to the crc_extra. Before this change the
parser would restart parsing on the second CRC byte. This
can cause the parser to be out of sync and drop messages if
the second CRC byte happens to be MAVLINK_STX.
Now the parser will ignore the MAVLINK_STX if it was
received as the second byte of a bad CRC message.
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 this pull request may close these issues.

Bad checksum messages ending with MAVLINK_STX causing parser get out of sync
1 participant