From bc12a61c9afbbee6184c79d95a1ebaa7c867700f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 29 Jun 2022 17:56:59 +1000 Subject: [PATCH] autotest: use slightly faster recv_msg call in drain_mav Cuts out some code in pymavlink's recv_match which we don't need here. We even explicitly don't run the idle hooks which pymavlink supplied when we're running under drain_mav --- Tools/autotest/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index c40fadbbbb..78ab37afba 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -2731,7 +2731,7 @@ class AutoTest(ABC): tstart = time.time() timeout = 120 failed_to_drain = False - while mav.recv_match(blocking=False) is not None: + while mav.recv_msg() is not None: count += 1 if time.time() - tstart > timeout: # ArduPilot can produce messages faster than we can