autotest: tidy TestGripperMission

take advantage of new infrastructure
This commit is contained in:
Peter Barker 2024-06-19 13:08:16 +10:00 committed by Peter Barker
parent 35cb526241
commit 6aa662d5d0

View File

@ -5155,10 +5155,7 @@ class AutoTestCopter(vehicle_test_suite.TestSuite):
def TestGripperMission(self):
'''Test Gripper mission items'''
self.context_push()
ex = None
try:
self.load_mission("copter-gripper-mission.txt")
num_wp = self.load_mission("copter-gripper-mission.txt")
self.change_mode('LOITER')
self.wait_ready_to_arm()
self.assert_vehicle_location_is_at_startup_location()
@ -5167,14 +5164,8 @@ class AutoTestCopter(vehicle_test_suite.TestSuite):
self.set_rc(3, 1500)
self.wait_statustext("Gripper Grabbed", timeout=60)
self.wait_statustext("Gripper Released", timeout=60)
except Exception as e:
self.print_exception_caught(e)
self.change_mode('LAND')
ex = e
self.context_pop()
self.wait_waypoint(num_wp-1, num_wp-1)
self.wait_disarmed()
if ex is not None:
raise ex
def SplineLastWaypoint(self):
'''Test Spline as last waypoint'''