From 2cf2f07628d6985ea32c18ff1a02cce501ee2a77 Mon Sep 17 00:00:00 2001 From: bhannawa <78210177+bhannawa@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:33:54 -0400 Subject: [PATCH] Send heartbeat from mavlink_ulog_streaming.py to enable log streaming Log streaming wouldn't work unless the script is run after mavlink_shell.py script. By sending a heartbeat from here, the ulog streaming script can be run without running the shell script first. --- Tools/mavlink_ulog_streaming.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/mavlink_ulog_streaming.py b/Tools/mavlink_ulog_streaming.py index 2b21f1032741..6e45a27a1264 100755 --- a/Tools/mavlink_ulog_streaming.py +++ b/Tools/mavlink_ulog_streaming.py @@ -39,6 +39,7 @@ def __init__(self, portname, baudrate, output_filename, debug=0): self.buf = '' self.debug("Connecting with MAVLink to %s ..." % portname) self.mav = mavutil.mavlink_connection(portname, autoreconnect=True, baud=baudrate) + self.mav.mav.heartbeat_send(mavutil.mavlink.MAV_TYPE_GENERIC, mavutil.mavlink.MAV_AUTOPILOT_INVALID, 0, 0, 0) self.mav.wait_heartbeat() self.debug("HEARTBEAT OK\n") self.debug("Locked serial device\n")