From f14c9db568e622a6d9e6862090d27673e918f477 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 19 Aug 2020 11:21:55 +1000 Subject: [PATCH] autotest: improve debug around heli poshold takeoff test --- Tools/autotest/arducopter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 2588f55975..1993cac115 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -5574,8 +5574,10 @@ class AutoTestHeli(AutoTestCopter): self.delay_sim_time(20) # check we are still on the ground... m = self.mav.recv_match(type='GLOBAL_POSITION_INT', blocking=True) - if abs(m.relative_alt) > 100: - raise NotAchievedException("Took off prematurely") + max_relalt = 100 + if abs(m.relative_alt) > max_relalt: + raise NotAchievedException("Took off prematurely (abs(%f)>%f)" % + (m.relative_alt, max_relalt)) self.progress("Pushing throttle past half-way") self.set_rc(3, 1600) self.delay_sim_time(0.5)