From dd88e6e85c66dc4528cf92e6fe163841dfcc8ac2 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 29 Nov 2018 09:48:31 +1100 Subject: [PATCH] Tools: autotest: correct wait_servo_channel_value error path Also make flaps test a little more verbose --- Tools/autotest/arduplane.py | 6 +++--- Tools/autotest/common.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index cc74d297ca..53524e3031 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -562,10 +562,10 @@ class AutoTestPlane(AutoTest): self.set_parameter("SERVO%u_MAX" % servo_ch, servo_ch_max) self.set_parameter("SERVO%u_TRIM" % servo_ch, servo_ch_trim) - # check flaps are not deployed: + self.progress("check flaps are not deployed") self.set_rc(flaps_ch, flaps_ch_min) self.wait_servo_channel_value(servo_ch, servo_ch_min) - # deploy the flaps: + self.progress("deploy the flaps") self.set_rc(flaps_ch, flaps_ch_max) tstart = self.get_sim_time() self.wait_servo_channel_value(servo_ch, servo_ch_max) @@ -576,7 +576,7 @@ class AutoTestPlane(AutoTest): if delta_time < delta_time_min or delta_time > delta_time_max: raise NotAchievedException(( "Flaps Slew not working (%f seconds)" % (delta_time,))) - # undeploy flaps: + self.progress("undeploy flaps") self.set_rc(flaps_ch, flaps_ch_min) self.wait_servo_channel_value(servo_ch, servo_ch_min) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index a19d9864da..e47ef2f007 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -1163,6 +1163,8 @@ class AutoTest(ABC): m = self.mav.recv_match(type='SERVO_OUTPUT_RAW', blocking=True, timeout=remaining) + if m is None: + continue m_value = getattr(m, channel_field, None) self.progress("SERVO_OUTPUT_RAW.%s=%u want=%u" % (channel_field, m_value, value))