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

Fix truncating 0s when encoding frame #22

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wdueease
Copy link
Contributor

I noticed that when serializing frames, trailing 0's weren't being truncated. I added some tests to verify this behavior.

I used pymavlink to generate some reference serialized bytes and used them as the expected value in the tests. I can include the python file I used to generate the serialized frames if that's helpful. Currently leaving it off to keep the repo tidy.

I chose to do the truncation at the frame.serialize() level, although it could also be done at the message.serialize() level. I feel like it made more sense at the frame level since that keeps all the CRC stuff in the same location.

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.

1 participant