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 TimeF1 ms decoding #31

Merged
merged 3 commits into from
Dec 7, 2022
Merged

Fix TimeF1 ms decoding #31

merged 3 commits into from
Dec 7, 2022

Conversation

linville
Copy link
Contributor

@linville linville commented Dec 6, 2022

This fixes the TimeF1 calculation of milliseconds from the component hundredths and tenths.

I opted to add a tiny new test that checks the encoding/decoding of a TimeF1 packet with non-zero milliseconds. Another option would be to modify the sample.c10 file to have a TimeF1 packet with a non-zero milliseconds, but this potentially involved modifying a lot of other trailing packets (and reverifying any tests that use the sample fixture).

Drive-by: Fix minor issue with an AttributeError when manually creating an instance of a TimeF1 packet.

Fixes #30

@mcferrill
Copy link
Member

Good catch. Thanks for the PR!

@mcferrill mcferrill merged commit dfce463 into atac:master Dec 7, 2022
@linville linville deleted the issue-30 branch December 7, 2022 13:27
@linville linville mentioned this pull request Jan 9, 2023
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.

TimeF1 ms incorrect decoding
2 participants