From 5f315aab59ccb4ce5792f8b54f690dc537c678fe Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 2 Mar 2019 22:08:53 +1100 Subject: [PATCH] Tools: autotest: fix infinite hang in wait_statustext --- Tools/autotest/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index b3b8ed519c..88150eba76 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -1580,7 +1580,9 @@ class AutoTest(ABC): while self.get_sim_time() < tstart + timeout: if the_function is not None: the_function() - m = self.mav.recv_match(type='STATUSTEXT', blocking=True) + m = self.mav.recv_match(type='STATUSTEXT', blocking=True, timeout=0.1) + if m is None: + continue if text.lower() in m.text.lower(): self.progress("Received expected text : %s" % m.text.lower()) return True