alduxvm / pyMultiWii

MultiWii Serial Protocol (MSP) API to send and receive data from firmware using MSP
GNU General Public License v3.0
153 stars 84 forks source link

Can't read sensor data #30

Open farmingmachine opened 5 years ago

farmingmachine commented 5 years ago

Hey,

I am trying to get sensor data to my Py from my sp 3 racing board (using betaflight). Unfortunately i get the following error while doing so:

unpack requires a bytes object of length 1 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte unpack requires a bytes object of length 1 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte 'utf-8' codec can't decode byte 0xfc in position 0: invalid start byte 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

I think there is an issue with reading the header in the init.py file. Would you know the reason?

Kind regards,

maxmine11 commented 4 years ago

I think this has to be with the fact that python 3 struct.pack() returns a binary string instead that on python 2.x which returns a string. I'm having similar issues.