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

bitbang port.setter encoding errors on "too big" values #6

Closed
PlasmaHH opened this issue Nov 22, 2023 · 1 comment
Closed

bitbang port.setter encoding errors on "too big" values #6

PlasmaHH opened this issue Nov 22, 2023 · 1 comment

Comments

@PlasmaHH
Copy link

While playing with the library and especially things like <<= I quickly ran into the issue that for the BitBangDevice the port value is getting > 255 which wil then cause the chr(value) to try to generate something that can't later be encoded in device.py write().

For me I fixed this by masking the value the setter gets with & 0xff so I can make sure that it behaves as if it was an 8 bit integer.

@codedstructure
Copy link
Owner

Thanks for raising this issue!

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

2 participants