From 7e411cb5e60f7f08fefd25d9a47ff66eb13db61d Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Tue, 31 Oct 2023 20:37:31 -0300 Subject: [PATCH] Autotest: improve flapping Sub test --- Tools/autotest/ardusub.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/autotest/ardusub.py b/Tools/autotest/ardusub.py index fcc622ddfba76f..8c94f91d29157d 100644 --- a/Tools/autotest/ardusub.py +++ b/Tools/autotest/ardusub.py @@ -457,6 +457,7 @@ def MAV_CMD_MISSION_START(self): def MAV_CMD_DO_CHANGE_SPEED(self): '''ensure vehicle changes speeds when DO_CHANGE_SPEED received''' items = [ + (mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 0, 0, -3), # Dive so we have constrat drag (mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 2000, 0, -1), (mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 0), ] @@ -464,7 +465,9 @@ def MAV_CMD_DO_CHANGE_SPEED(self): self.wait_ready_to_arm() self.arm_vehicle() self.run_cmd(mavutil.mavlink.MAV_CMD_MISSION_START) + self.wait_mode('AUTO') self.progress("SENT MISSION START") + self.wait_current_waypoint(2) # wait after we finish diving to 3m for run_cmd in self.run_cmd, self.run_cmd_int: for speed in [1, 1.5, 0.5]: run_cmd(mavutil.mavlink.MAV_CMD_DO_CHANGE_SPEED, p2=speed)