mavlink id 0 HEARTBEAT
mavlink id 1 SYS_STATUS
from pymavlink import mavutil
# Create the connection
# From topside computer
master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
while True:
msg = master.recv_match()
if not msg:
continue
if msg.get_type() == 'HEARTBEAT':
print("\n\n*****Got message: %s*****" % msg.get_type())
print("Message: %s" % msg)
print("\nAs dictionary: %s" % msg.to_dict())
# Armed = MAV_STATE_STANDBY (4), Disarmed = MAV_STATE_ACTIVE (3)
print("\nSystem status: %s" % msg.system_status)
作者:bai 创建时间:2024-09-14 14:04
最后编辑:bai 更新时间:2025-05-29 13:41
最后编辑:bai 更新时间:2025-05-29 13:41