autotest: Fix failing copter fly_square test

This test should be flown in ALT_HOLD, not  STABILIZE as that is better mode to test the record waypoint function becasue it removes the need to fine tune the RC3 value to match thrust/weight variation as the hover thrust is not learned fast enough at the start of the test.
This commit is contained in:
Paul Riseborough 2020-12-06 09:02:42 +11:00 committed by Andrew Tridgell
parent 47d4506e68
commit a3b5901218

View File

@ -311,7 +311,7 @@ class AutoTestCopter(AutoTest):
self.clear_mission_using_mavproxy()
self.takeoff(10)
self.takeoff(10, mode="ALT_HOLD")
"""Fly a square, flying N then E ."""
tstart = self.get_sim_time()
@ -335,11 +335,8 @@ class AutoTestCopter(AutoTest):
self.progress("Save WP 1 & 2")
self.save_wp()
# switch back to stabilize mode
self.change_mode('STABILIZE')
# increase throttle a bit because we're about to pitch:
self.set_rc(3, 1525)
# switch back to ALT_HOLD mode
self.change_mode('ALT_HOLD')
# pitch forward to fly north
self.progress("Going north %u meters" % side)