From e78f74f6d5ac11a06fa29f0457ec66efc9cbad86 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 21 Aug 2018 12:20:57 -0700 Subject: [PATCH] Back up further from end of file to handle more cases --- src/comm/LogReplayLink.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comm/LogReplayLink.cc b/src/comm/LogReplayLink.cc index 7c2cc4f9b0..a97a84b33b 100644 --- a/src/comm/LogReplayLink.cc +++ b/src/comm/LogReplayLink.cc @@ -269,7 +269,7 @@ bool LogReplayLink::_loadLogFile(void) // timestamp size. This guarantees that we will hit a MAVLink packet before // the end of the file. Unfortunately, it basically guarantees that we will // hit more than one. This is why we have to search for a bit. - qint64 fileLoc = _logFile.size() - MAVLINK_MAX_PACKET_LEN - cbTimestamp; + qint64 fileLoc = _logFile.size() - ((MAVLINK_MAX_PACKET_LEN - cbTimestamp) * 2); _logFile.seek(fileLoc); quint64 endTimeUSecs = startTimeUSecs; // Set a sane default for the endtime mavlink_message_t msg; -- GitLab