Skip to content

Commit

Permalink
mavutil: wait_heartbeat takes a timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jul 22, 2018
1 parent 52ec0bd commit 9143db6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mavutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ def setup_logfile_raw(self, logfile, mode='w'):
'''start logging raw bytes to the given logfile, without timestamps'''
self.logfile_raw = open(logfile, mode=mode)

def wait_heartbeat(self, blocking=True):
def wait_heartbeat(self, blocking=True, timeout=None):
'''wait for a heartbeat so we know the target system IDs'''
return self.recv_match(type='HEARTBEAT', blocking=blocking)
return self.recv_match(type='HEARTBEAT', blocking=blocking, timeout=timeout)

def param_fetch_all(self):
'''initiate fetch of all parameters'''
Expand Down

0 comments on commit 9143db6

Please sign in to comment.