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
This commit is contained in:
Peter Barker 2022-06-29 17:56:59 +10:00 committed by Peter Barker
parent 208554d402
commit bc12a61c9a

View File

@ -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