ArduPilot / pymavlink

python MAVLink interface and utilities
Other
486 stars 587 forks source link

mavplayback fails playing back .BIN file #963

Open swilliam opened 1 month ago

swilliam commented 1 month ago

mavplayback.py playing back a .BIN log file

$ mavplayback.py 00000038.BIN
Traceback (most recent call last):
  File "~/bin/mavplayback.py", line 256, in <module>
    app=App(filename)
  File "~/bin/mavplayback.py", line 104, in __init__
    self.next_message()
  File "~/bin/mavplayback.py", line 199, in next_message
    pos = float(self.mlog.f.tell()) / self.filesize
AttributeError: 'DFReader_binary' object has no attribute 'f'

mavplayback.py uses DFReader_binary class from DFReader.py to load .BIN file, but that class has no f attribute instead it uses filehandle

playback of .tlog files works

gamoreno commented 2 weeks ago

I have the same problem. I replaced f with filehandle and it doesn't throw the error, but it seems to be sending invalid mavlink messages in the out port.