Skip to content

Commit 2314cd4

Browse files
committed
Improve error message when logging was paused for the entire flight
1 parent 71a8322 commit 2314cd4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

js/flightlog_index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ function FlightLogIndex(logData) {
5959
matches,
6060
throttleTotal,
6161
eventInThisChunk = null,
62-
parsedHeader;
62+
parsedHeader,
63+
sawEndMarker = false;
6364

6465
try {
6566
parser.parseHeader(logBeginOffsets[i], logBeginOffsets[i + 1]);
@@ -160,6 +161,10 @@ function FlightLogIndex(logData) {
160161
if (intraIndex.times.length > 0) {
161162
intraIndex.hasEvent[intraIndex.times.length - 1] = true;
162163
}
164+
165+
if (frame.event == FlightLogEvent.LOG_END) {
166+
sawEndMarker = true;
167+
}
163168
break;
164169
case 'S':
165170
lastSlow = frame.slice(0);
@@ -183,7 +188,11 @@ function FlightLogIndex(logData) {
183188

184189
// Did we not find any events in this log?
185190
if (intraIndex.minTime === false) {
186-
intraIndex.error = "Log is truncated, contains no data";
191+
if (sawEndMarker) {
192+
intraIndex.error = "Logging was paused, no data recorded";
193+
} else {
194+
intraIndex.error = "Log is truncated, contains no data";
195+
}
187196
}
188197

189198
intraframeDirectories.push(intraIndex);

0 commit comments

Comments
 (0)