Skip to content

Commit

Permalink
autotest: add a method to easily install message printer
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 22, 2022
1 parent fa8e5ad commit f9bc7e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tools/autotest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9636,6 +9636,15 @@ def check_terrain_requests(mav, m):

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
Expand Down

0 comments on commit f9bc7e4

Please sign in to comment.