COMMAND_CANCEL 80

Field Name
Type
Values
Description
command
uint16_t
Command ID (of command to cancel).









import time
from pymavlink import mavutil

timestamp = int(time.time() * 1000)
millis = int(time.time() * 1000)

master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
master.wait_heartbeat()
boot_time = time.time()
#command_cancel
def cancel():
    master.mav.command_cancel_send(
        int(1e3 * (time.time() - boot_time)),  # ms since boot
        command=33
    )

cancel()
作者:bai  创建时间:2024-09-14 16:10
最后编辑:bai  更新时间:2024-11-20 18:12
返回command = MAV_CMD_REQUEST_MESSAGE返回值 param1 33 执行命令id返回值 param2 0或1 是否执行成功返回值 param3 失败代码失败代码列表0 无异常1 无法初始化无人机飞行控制2 获取无人机控制权失败3 创建飞行线程失败