Skip to content

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

Closed
@PlasmaHH

Description

@PlasmaHH

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions