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

SerialConnection cannot write arbitrary byte sequences #100

Open
ryosukecooltanaka opened this issue Nov 14, 2024 · 0 comments
Open

SerialConnection cannot write arbitrary byte sequences #100

ryosukecooltanaka opened this issue Nov 14, 2024 · 0 comments

Comments

@ryosukecooltanaka
Copy link

The write() method of SerialConnection class takes string as an argument and convert them into bytes with the encode() method of the python string (with utf-8), but this can be inconvenient as no strings can be encoded into values between 128~255 (UTF-8 encoding table).

This string encoding can be easily bypassed by directly passing the desired byte sequence to SerialConnection.conn.write(), but conceivably changes can be made such that SerialConnection.write() decides whether or not to encode according to input types.

Not a big deal but just noting here as I wasted 1 hour figuring this out...

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