Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFReader: provide __MAV__ message for log metadata #648

Merged
merged 1 commit into from
May 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions DFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,11 @@ def __init__(self):
self.verbose = False
self.params = {}
self._flightmodes = None
self.messages = {}
self.messages = {
'MAV': self,
'__MAV__': self, # avoids conflicts with messages actually called "MAV"
}
self.percent = 0

def _rewind(self):
'''reset state on rewind'''
Expand All @@ -492,7 +496,10 @@ def _rewind(self):
# need their messages to disappear to. If they want their own
# copy they can copy.copy it!
self.messages.clear()
self.messages['MAV'] = self
self.messages = {
'MAV': self,
'__MAV__': self, # avoids conflicts with messages actually called "MAV"
}
if self._flightmodes is not None and len(self._flightmodes) > 0:
self.flightmode = self._flightmodes[0][0]
else:
Expand Down