Drone is ANAFI USA.
I refer to the example.
I can use the takeoff command.
mavlink_message_t* msg = new mavlink_message_t();
mavlink_command_long_t data;
data.command = MAV_CMD::MAV_CMD_NAV_TAKEOFF;
data.confirmation = 0;
data.param1 = 0;
data.param2 = 0;
data.param3 = 0;
data.param4 = 0;
data.param5 = 0;
data.param6 = 0;
data.param7 = 1;
data.target_system = m_TargetSystemId;
data.target_component = m_TargetComponentId;
mavlink_msg_command_long_encode(m_SystemId, m_ComponentId, msg, &data);
uint16_t len = mavlink_msg_to_send_buffer(buf, msg);
UDP_Socket->Send(buf, len);
take off is work,
but land not work.
mavlink_message_t* msg = new mavlink_message_t();
mavlink_command_long_t data;
data.command = MAV_CMD::MAV_CMD_NAV_LAND;
data.confirmation = 0;
data.param1 = 0;
data.param2 = 0;
data.param3 = 0;
data.param4 = 0;
data.param5 = 0;
data.param6 = 0;
data.param7 = 0;
data.target_system = m_TargetSystemId;
data.target_component = m_TargetComponentId;
mavlink_msg_command_long_encode(m_SystemId, m_ComponentId, msg, &data);
uint16_t len = mavlink_msg_to_send_buffer(buf, msg);
UDP_Socket->Send(buf, len);
Is the landing command wrong?