From 74b23adfacfeb22c86e4c4f9502f064a5fb27b07 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 5 May 2023 10:42:47 +1000 Subject: [PATCH] autotest: improve diagnostics when waiting for EKF state --- Tools/autotest/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index f25f375e81..59eabe2671 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -7486,6 +7486,7 @@ Also, ignores heartbeats not from our target system''' self.progress("Waiting for EKF value %u" % required_value) last_print_time = 0 tstart = self.get_sim_time() + m = None while timeout is None or self.get_sim_time_cached() < tstart + timeout: m = self.mav.recv_match(type='EKF_STATUS_REPORT', blocking=True, timeout=timeout) if m is None: @@ -7501,6 +7502,11 @@ Also, ignores heartbeats not from our target system''' if everything_ok: self.progress("EKF Flags OK") return True + m_str = str(m) + if m is not None: + m_str = self.dump_message_verbose(m) + self.progress("Last EKF_STATUS_REPORT message:") + self.progress(m_str) raise AutoTestTimeoutException("Failed to get EKF.flags=%u" % required_value)