Skip to content

Commit

Permalink
Tools: autotest: copter: RecordThenPlayMission expect takeoff as fi…
Browse files Browse the repository at this point in the history
…rst item
  • Loading branch information
IamPete1 committed Jan 14, 2025
1 parent 7abc9d0 commit 6623016
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ def RecordThenPlayMission(self, side=50, timeout=300):
self.set_rc(3, 1500)
self.save_wp()

# Disarm and reset before testing mission
self.land_and_disarm()
self.set_rc(3, 1000)
self.change_mode('LOITER')

# save the stored mission to file
mavproxy = self.start_mavproxy()
num_wp = self.save_mission_to_file_using_mavproxy(
Expand All @@ -386,9 +391,11 @@ def RecordThenPlayMission(self, side=50, timeout=300):
if not num_wp:
raise NotAchievedException("save_mission_to_file failed")

self.arm_vehicle()
self.progress("test: Fly a mission from 1 to %u" % num_wp)
self.change_mode('AUTO')
self.set_current_waypoint(1)
# Raise throttle in auto to trigger takeoff
self.set_rc(3, 1500)
self.wait_waypoint(0, num_wp-1, timeout=500)
self.progress("test: MISSION COMPLETE: passed!")
self.land_and_disarm()
Expand Down

0 comments on commit 6623016

Please sign in to comment.