You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
The text was updated successfully, but these errors were encountered:
The
write()
method ofSerialConnection
class takes string as an argument and convert them into bytes with theencode()
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 thatSerialConnection.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...
The text was updated successfully, but these errors were encountered: