autotest: add a method to easily install message printer

This commit is contained in:
Peter Barker 2022-09-22 08:52:09 +10:00 committed by Peter Barker
parent fa8e5ad3f1
commit f9bc7e44f8

View File

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