Skip to content

Commit

Permalink
DFReader.py: fix MAVProxy dump command on .log files
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jan 5, 2024
1 parent f2286dc commit 0a6dbf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ class DFReader_text(DFReader):
'''parse a text dataflash file'''
def __init__(self, filename, zero_time_base=False, progress_callback=None):
DFReader.__init__(self)
self.name_to_id = {}
# read the whole file into memory for simplicity
self.filehandle = open(filename, 'r')
self.filehandle.seek(0, 2)
Expand Down Expand Up @@ -1266,6 +1267,7 @@ def _parse_next(self):
oldfmt=self.formats.get(ftype,None))
self.formats[fname] = new_fmt
self.id_to_name[ftype] = fname
self.name_to_id[fname] = ftype

try:
m = DFMessage(fmt, elements, False, self)
Expand Down

0 comments on commit 0a6dbf3

Please sign in to comment.