diff --git a/tools/mavplayback.py b/tools/mavplayback.py index 73f9d833d..f744683c3 100755 --- a/tools/mavplayback.py +++ b/tools/mavplayback.py @@ -18,6 +18,7 @@ import tkinter from pymavlink import fgFDM +from pymavlink import DFReader from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) @@ -57,6 +58,10 @@ def __init__(self, filename): self.mlog = mavutil.mavlink_connection(filename, planner_format=args.planner, robust_parsing=True) + if isinstance(self.mlog, DFReader.DFReader_binary): + print("mavplayback.py only works on .tlog files, not BIN ('dataflash') files") + sys.exit(1) + self.mout = [] for m in args.out: self.mout.append(mavutil.mavlink_connection(m, input=False, baud=args.baudrate))