Skip to content

Commit

Permalink
Send heartbeat from mavlink_ulog_streaming.py to enable log streaming
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bhannawa authored Oct 25, 2024
1 parent cac0133 commit 2cf2f07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Tools/mavlink_ulog_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 2cf2f07

Please sign in to comment.