MAV_CMD_VIDEO_START_STREAMING 2502

param1 0 开启下视推流
param1 1关闭下视推流

python测试脚本

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()

def pushDown():
    master.mav.command_long_send(
        master.target_system,
        master.target_component,
        mavutil.mavlink.MAV_CMD_VIDEO_START_STREAMING,
        0,
        0, 0, 0, 0, 0, 0, 0
    )

pushDown()
while True:
    msg = master.recv_match()
    if not msg:
        continue
    if msg.get_type() == 'COMMAND_LONG':
        print("\n\n*****Got message: %s*****" % msg.get_type())
        print("Message: %s" % msg)
        print("\nAs dictionary: %s" % msg.to_dict())
作者:bai  创建时间:2024-09-14 16:19
最后编辑:bai  更新时间:2024-09-27 11:15