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

Invalid i2c_msg created from a string in Python 3.x character value >= 128 #32

Closed
kplindegaard opened this issue Jan 9, 2019 · 0 comments

Comments

@kplindegaard
Copy link
Owner

This does not work properly in Python 3.x in version 0.2.2 and earlier

from smbus2 import i2c_msg

address = 80
msg1 = i2c_msg.write(address,  'ABC\xff')  # Notice value 0xFF (255) as last value
msg2 = i2c_msg.write(address, [65, 66, 67, 255])  # Same same, just using list instead
msg1.len == msg2.len  # False in Python 3.x !!
@kplindegaard kplindegaard changed the title Invalid i2c_msg creaed from a string in Python 3.x character value >= 128 Invalid i2c_msg created from a string in Python 3.x character value >= 128 Jan 9, 2019
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