From c01b26ca62962c4f2e5414b42c23cd7af0d39cfb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 28 Aug 2020 22:28:14 +1000 Subject: [PATCH] autotest: fix race condition in EKF type 10 EKF type 10 is always able to give you a position - but the arming checks require you to have a good GPS position, and that's something else again. --- Tools/autotest/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index a384954960..cd0f6c96fb 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -3886,6 +3886,10 @@ class AutoTest(ABC): if require_absolute: self.wait_gps_sys_status_not_present_or_enabled_and_healthy() armable_time = self.get_sim_time() - start + if require_absolute: + m = self.poll_home_position() + if m is None: + raise NotAchievedException("Did not receive a home position") self.progress("Took %u seconds to become armable" % armable_time) self.total_waiting_to_arm_time += armable_time self.waiting_to_arm_count += 1