Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotest: improve flapping Sub test #25421

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Tools/autotest/ardusub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]
Expand All @@ -465,6 +466,8 @@ def MAV_CMD_DO_CHANGE_SPEED(self):
self.arm_vehicle()
self.run_cmd(mavutil.mavlink.MAV_CMD_MISSION_START)
self.progress("SENT MISSION START")
self.wait_mode('AUTO')
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)
Expand Down