From f9bc7e44f85266abd66fe59a93d0e75de3a7b645 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 22 Sep 2022 08:52:09 +1000 Subject: [PATCH] autotest: add a method to easily install message printer --- Tools/autotest/common.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 0d0da302f1..25b58f7756 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -9636,6 +9636,15 @@ Also, ignores heartbeats not from our target system''' self.install_message_hook_context(check_terrain_requests) + def install_messageprinter_handlers_context(self, messages): + '''monitor incoming messages, print them out''' + def check_messages(mav, m): + if m.get_type() not in messages: + return + self.progress(self.dump_message_verbose(m)) + + self.install_message_hook_context(check_messages) + def SetpointGlobalPos(self, timeout=100): """Test set position message in guided mode.""" # Disable heading and yaw test on rover type