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

Flag Field adds unused bits to packet #104

Open
btgarber opened this issue Jul 17, 2020 · 0 comments
Open

Flag Field adds unused bits to packet #104

btgarber opened this issue Jul 17, 2020 · 0 comments

Comments

@btgarber
Copy link

Brief Description

When using the FlagField it adds extra "unused" bits to the packet. Since this is intended to the a single bit, it would be nice to have this bitpacked to keep the 1 bit goal. Looks to be adding an entire 16bit word for the Flag Field

Version(s) encountered

Latest

Expected Behavior

field1=models.IntField16(bit_len=8, default_val=0)
field2=models.FlagField(default_val=False)
field3=models.IntField16(bit_len=6, default_val=12)
field4=models.FlagField(default_val=True)

Print = b'\x00\xe0'

Actual Behavior

Print = b'\x00\x00\x00\x0c\x00\x01'

System Details

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

No branches or pull requests

1 participant