Browse Source

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.
c415-sdk
Paul Riseborough 4 years ago committed by Andrew Tridgell
parent
commit
a3b5901218
  1. 9
      Tools/autotest/arducopter.py

9
Tools/autotest/arducopter.py

@ -311,7 +311,7 @@ class AutoTestCopter(AutoTest): @@ -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): @@ -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)

Loading…
Cancel
Save