Pymavlink DISARM command

Hello, I am trying to arm my SITL drone using command from that link
http://discuss.bluerobotics.com/t/sending-mavproxy-messages-from-a-python-program/1515/2 I am using MAVLink in 2.0 version.

My code looks like

autopilot.mav.command_long_send(
255, #1# autopilot system id
0, #1# autopilot component id
400, # command id, ARM/DISARM
0, # confirmation
0.0, # disarm!
0.0,0.0,0.0,0.0,0.0,0.0, # unused parameters for this command,
force_mavlink1=False
)

According to file /usr/local/lib/python2.7/dist-packages/pymavlink/dialects/v20/common.py
i should use float as a parameter.

Send a command with up to seven parameters to the MAV

target_system : System which should execute the command (uint8_t)
target_component : Component which should execute the command, 0 for all components (uint8_t)
command : Command ID, as defined by MAV_CMD enum. (uint16_t)
confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (uint8_t)
param1 : Parameter 1, as defined by MAV_CMD enum. (float)
param2 : Parameter 2, as defined by MAV_CMD enum. (float)
param3 : Parameter 3, as defined by MAV_CMD enum. (float)
param4 : Parameter 4, as defined by MAV_CMD enum. (float)
param5 : Parameter 5, as defined by MAV_CMD enum. (float)
param6 : Parameter 6, as defined by MAV_CMD enum. (float)
param7 : Parameter 7, as defined by MAV_CMD enum. (float)

Unfortunately the result which i can see in SITL command line is
Got MAVLink msg: COMMAND_ACK {command : 400, result : 3}
Which mean that there is some mistakes in my message.

Thanks for any help

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity