Skip to content

Commit

Permalink
Autotest: improve flapping Sub test
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and peterbarker committed Nov 1, 2023
1 parent 6439528 commit 40cdb5d
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit 40cdb5d

Please sign in to comment.