alduxvm/pyMultiWii

Error in sendCMDreceiveATT. (tuple index out of range)

EonAndahalf opened this issue · 6 comments

Hello!

I'm getting an error in the terminal:

Error in sendCMDreceiveATT.
(tuple index out of range)

I'm using a Jetson nano (Ubuntu 18.04 (Python 3.6.9) ) to control a Mamba F405 FC over serial port, with the example code:

data = [1500,1500,1000,1500,1000,1000,1000,1000]
board.sendCMDreceiveATT(16,MultiWii.SET_RAW_RC,data)

Everything else is working fine except sending channel data. The weird thing is that the flight controller is receiving every channel data from my script and I can actually control the FC, except that error.

Thank you in advance!

Did you activated serialRX on the GUI of the flight controller?

Also, I will recommend to use the sendCMD function, not the send and receive...

Hi !
"Did you activated serialRX on the GUI of the flight controller?"

If you mean on the Ports tab, then I have activated MSP on UART3, as that is where I connect the Jetson Nano. ( J41 GPIO pins on jetson nano to UART3 on the Flight controller ) as for the serialRX it is activated on UART1 by default. Betaflight is not allowing me to simultaneously activate MSP and serialRX on UART3. Not really sure where serialRX is supposed to be activated.

"Also, I will recommend to use the sendCMD function, not the send and receive..."

The sendCMD function requires an argument: 'data_format', and I cant seem to find what format that has to be.

Also the "Receiver" section in the "Configurations" tab is set to: "MSP RX input (control via MSP port)"

regarding serialRX... thats an specific section of the flight controller firmware, not from the companion computer. What firmware are you running on the flight controller? baseflight or betaflight?

if the above is not configured properly you will never be able to send commands to the flight controller. Also, you can see the function arm/disarm to see how to use the sendCMD function... but as I mentioned before, if you do not solve the first section of the configuration of the flight controller, the rest will not work... Also, in some flight controllers, only one input is used... if you have a radio hooked to the flight controller you need to remove it or you will not be able to write the commands to the FC... that totally depends on the firmware you're using on the FC

@EonAndahalf did it work?