Finally, struct unpack work. This is just the documentation witch is not up to date (maybe or I missed something...)
I have an OpenIMU300RI 5020-3309-01 03.01.08 SN:2003100118, Firmware: IMU_J1939 03.01.08
my packet type is 0x7331 's1', and not 0x7a31 'z1' as given
Posts made by Fredz
RE: How to convert hexadecimal serial data into real decimal data
posted in The OpenIMU Family •
RE: How to convert hexadecimal serial data into real decimal data
posted in The OpenIMU Family •
Hello,
I agree with Luken. It would be nice to know how to convert bytes to float.
There is in python int.from_bytes but no equivalent for floats.
And also, in the example from https://github.com/erkuo521/openimu_log_tools/blob/master/openimu.py
"fmt = 'Ifffffffff'
data = struct.unpack(fmt, payload)"
give unusable results.
Thanks for your help.