Skip to content

Commit

Permalink
pymavlink: allow conditionals on parameters in DF logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Tridgell committed Mar 24, 2014
1 parent 332524a commit c1f6c2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymavlink/DFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def __init__(self):
self.px4_timebase = 0
self.timestamp = 0
self.verbose = False
self.params = {}

def _rewind(self):
'''reset counters on rewind'''
Expand Down Expand Up @@ -256,6 +257,8 @@ def _add_msg(self, m):
self.flightmode = mavutil.mode_string_apm(m.ModeNum)
else:
self.flightmode = mavutil.mode_string_acm(m.Mode)
if type == 'PARM' and getattr(m, 'Name', None) is not None:
self.params[m.Name] = m.Value
self._set_time(m)

def recv_match(self, condition=None, type=None, blocking=False):
Expand Down

0 comments on commit c1f6c2f

Please sign in to comment.