diff --git a/tools/mavplayback.py b/tools/mavplayback.py index 0082ca142..73f9d833d 100755 --- a/tools/mavplayback.py +++ b/tools/mavplayback.py @@ -122,18 +122,18 @@ def pause(self): def rewind(self): '''rewind 10%''' - pos = int(self.mlog.f.tell() - 0.1*self.filesize) + pos = int(self.mlog.f.tell() - 0.1 * self.filesize) if pos < 0: pos = 0 - self.mlog.filehandle.seek(pos) + self.mlog.f.seek(pos) self.find_message() def forward(self): '''forward 10%''' - pos = int(self.mlog.f.tell() + 0.1*self.filesize) + pos = int(self.mlog.f.tell() + 0.1 * self.filesize) if pos > self.filesize: pos = self.filesize - 2048 - self.mlog.filehandle.seek(pos) + self.mlog.f.seek(pos) self.find_message() def status(self): @@ -158,7 +158,7 @@ def slew(self, value): '''move to a given position in the file''' if float(value) != self.filepos: pos = float(value) * self.filesize - self.mlog.filehandle.seek(int(pos)) + self.mlog.f.seek(int(pos)) self.find_message()