Tools: autotest: correct descent throttle in copter fence test

1500 is sufficient that we may not descend.
This commit is contained in:
Peter Barker 2018-09-04 12:53:53 +10:00 committed by Peter Barker
parent b4ecc347d7
commit a9621191d8
1 changed files with 2 additions and 3 deletions

View File

@ -515,18 +515,17 @@ class AutoTestCopter(AutoTest):
alt = m.relative_alt / 1000.0 # mm -> m alt = m.relative_alt / 1000.0 # mm -> m
pos = self.mav.location() pos = self.mav.location()
home_distance = self.get_distance(HOME, pos) home_distance = self.get_distance(HOME, pos)
self.progress("Alt: %u HomeDistance: %.0f" % self.progress("Alt: %f HomeDistance: %.0f" %
(alt, home_distance)) (alt, home_distance))
# recenter pitch sticks once we're home so we don't fly off again # recenter pitch sticks once we're home so we don't fly off again
if pitching_forward and home_distance < 10: if pitching_forward and home_distance < 10:
pitching_forward = False pitching_forward = False
self.set_rc(2, 1500) self.set_rc(2, 1475)
# disable fence # disable fence
self.set_parameter("FENCE_ENABLE", 0) self.set_parameter("FENCE_ENABLE", 0)
if alt <= 1 and home_distance < 10: if alt <= 1 and home_distance < 10:
# reduce throttle # reduce throttle
self.set_rc(3, 1000) self.set_rc(3, 1000)
# switch mode to stabilize
self.mavproxy.send('switch 2\n') # land mode self.mavproxy.send('switch 2\n') # land mode
self.wait_mode('LAND') self.wait_mode('LAND')
self.progress("Waiting for disarm") self.progress("Waiting for disarm")