From fa11361fb4e3607bb80ed1e6c8a4f0bd76fe2056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E5=96=B5?= Date: Wed, 10 Jun 2026 16:13:03 +0800 Subject: [PATCH] =?UTF-8?q?2036.6.10=E5=B0=8F=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- drone_controller/base_control.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drone_controller/base_control.py b/drone_controller/base_control.py index bddcf38..35acfcb 100644 --- a/drone_controller/base_control.py +++ b/drone_controller/base_control.py @@ -57,7 +57,8 @@ class DroneController: """初始化 MAVLink 串口连接,并等待首个心跳包""" try: print(f"正在尝试连接飞控 ({self.connection_string})...") - self.master = mavutil.mavlink_connection(self.connection_string, baud=self.baud) + # 当使用udp时网络不再重要 + self.master = mavutil.mavlink_connection(self.connection_string) self.master.wait_heartbeat(timeout=5) self.is_connected = True self.last_heartbeat_time = time.time()