Open iFreilicht opened 6 years ago
Any ETA on when this Pull Request is going to be added? I could really use this feature for 1-Wire addresses which look like '\x12\x5C\xEC\xA0\x00\x00\x00\x80' (64-bits). Thanks.
It seems the author hasn't had time to respond to any issues for weeks. In the meantime, you could just clone from my fork and then set this original repo as the remote once the changes are merged.
Will do, thanks.
On Dec 11, 2017, at 9:11 AM, Felix Uhl notifications@github.com wrote:
It seems the author hasn't had time to respond to any issues for weeks. In the meantime, you could just clone from my fork and then set this original repo as the remote once the changes are merged.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/harmsm/PyCmdMessenger/issues/33#issuecomment-350734924, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHZnB3EvNK7Q8WIlu0l_N-Ri7L1k-4Uks5s_TgmgaJpZM4Qk7W_.
I'm trying to use this code with a teensy 3.6. I've made sure the baud rates all match between the ArduinoBoard class instance, the sketch on the teensy, and the pingpong_test.py script. Also, I updated the data type sizes of the ArduinoBoard class to match here: https://forum.pjrc.com/threads/36658-datatypes-bit-depth
But I keep getting errors from
struct.unpack
struct.error unpack requires a buffer of 2 bytes
I commented out the 'kBBool', 'kBByte', and 'kChar', and found that 'kBInt16' tests pass up to -65536, each showing 'caught overflow', which I'm not sure is good or bad, but then it fails again from struct.unpack.
Any reason the smaller types shouldn't be working?
EDIT: I had the wrong sketch uploaded onto the micro. So now it works!
Right now, it is impossible to receive arbitrary byte-strings.
I wrote a simple setup where my python-script sends the character
'\xff'
and the Arduino sends that back.When a string is received where any characters are larger than 127, the
receive()
method fails:So I propose adding the format character
'B'
to indicate a byte string. This will receive the byte string just like_recv_string
does, but will just return it without decoding it or stripping any character.For sending, behaviour should be equivalent to
's'
as that already works perfectly fine.I'll implement this and create a pull request when I'm done.