Skip to content

Commit

Permalink
Tools: autotest: correct descent throttle in copter fence test
Browse files Browse the repository at this point in the history
1500 is sufficient that we may not descend.
  • Loading branch information
peterbarker committed Sep 5, 2018
1 parent b4ecc34 commit a962119
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,18 +515,17 @@ def fly_fence_test(self, timeout=180):
alt = m.relative_alt / 1000.0 # mm -> m
pos = self.mav.location()
home_distance = self.get_distance(HOME, pos)
self.progress("Alt: %u HomeDistance: %.0f" %
self.progress("Alt: %f HomeDistance: %.0f" %
(alt, home_distance))
# recenter pitch sticks once we're home so we don't fly off again
if pitching_forward and home_distance < 10:
pitching_forward = False
self.set_rc(2, 1500)
self.set_rc(2, 1475)
# disable fence
self.set_parameter("FENCE_ENABLE", 0)
if alt <= 1 and home_distance < 10:
# reduce throttle
self.set_rc(3, 1000)
# switch mode to stabilize
self.mavproxy.send('switch 2\n') # land mode
self.wait_mode('LAND')
self.progress("Waiting for disarm")
Expand Down

0 comments on commit a962119

Please sign in to comment.