-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement measurement decode #131
base: master
Are you sure you want to change the base?
Conversation
570d164
to
cc9ebf9
Compare
@rnestler I rebased and continued with this PR. First I wrote some tests and noticed that they always failed. After some debugging, I changed the loading of the bits from LE to BE: cf7f06e To be honest I still find it hard to understand the bitvec crate, but the tests pass now. From my view, after adding these tests, the PR should now be ready to merge. What do you think? |
Well this makes sense, since we store the bits in BE order (most significant bit first). |
True. Maybe it would be easier to just hand-roll the masking and shifting of the bits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess we can merge it as is, but maybe consider refactoring it in the future.
// Value: 0000_0101_1010 = 90 | ||
0b0000_0101, | ||
0b1010_0000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit a confusing test case, since it starts with 0000
and gets padded with 0000
. I'd use 1000_0101_1010
as the test case.
No description provided.