pyMultiWii icon indicating copy to clipboard operation
pyMultiWii copied to clipboard

cant seem to get sendCMD to work

Open sonnenberg16 opened this issue 4 years ago • 2 comments

hi, i'm using a F4 flight controller, i set the necessary settings in betaflight, and can read the imu and attitude from the FC, however when i try using the sendCMD i get the following error: Error on Main: pack expected 18 items for packing (got 26) this is the code i'm trynig:

data = [1500,1500,1000,1500,2000,1000,1000,1000] #roll/pitch/throttle/yaw/Aux1/2/3/4
for i in range(len(data)):
  binary = '{0:016b}'.format(data[i])
  data.append(int(binary[8:], 2))
  data.append(int(binary[:8], 2))
  self.sendCMD(16,MultiWii.SET_RAW_RC,data,'16B')

sonnenberg16 avatar Apr 18 '20 19:04 sonnenberg16

is great that you're getting data!

ok... for the commands... did you enable SERIALRX? also, back when I was doing this, only one control was permitted... so, do you have a remote also connect to it? try to remove it...

alduxvm avatar Apr 20 '20 13:04 alduxvm

@sonnenberg16 did it work?

Niko-La avatar Sep 13 '23 08:09 Niko-La