Skip to content

Commit

Permalink
autotest: add test for Sub MAV_CMD_MISSION_START
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Oct 3, 2023
1 parent c1e12f6 commit 41518a4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tools/autotest/ardusub.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,21 @@ def MAV_CMD_NAV_LAND(self):
cmd(mavutil.mavlink.MAV_CMD_NAV_LAND)
self.assert_mode('SURFACE')

def MAV_CMD_MISSION_START(self):
'''test handling of MAV_CMD_NAV_LAND received via mavlink'''
self.upload_simple_relhome_mission([
(mavutil.mavlink.MAV_CMD_NAV_WAYPOINT, 2000, 0, 0),
(mavutil.mavlink.MAV_CMD_NAV_RETURN_TO_LAUNCH, 0, 0, 0),
])

self.wait_ready_to_arm()
self.arm_vehicle()
for cmd in self.run_cmd, self.run_cmd_int:
self.change_mode('CIRCLE')
cmd(mavutil.mavlink.MAV_CMD_MISSION_START)
self.assert_mode('AUTO')
self.disarm_vehicle()

def tests(self):
'''return list of all tests'''
ret = super(AutoTestSub, self).tests()
Expand All @@ -456,6 +471,7 @@ def tests(self):
self.TestLogDownloadMAVProxy,
self.MAV_CMD_NAV_LOITER_UNLIM,
self.MAV_CMD_NAV_LAND,
self.MAV_CMD_MISSION_START,
])

return ret

0 comments on commit 41518a4

Please sign in to comment.