Replay: don't write out duplicate FMT messages

this makes replay output the same as input for when input is a replay
log
This commit is contained in:
Andrew Tridgell
2015-07-04 22:43:54 +10:00
parent 88a90495b2
commit bdddfae57f
5 changed files with 46 additions and 12 deletions
+5 -2
View File
@@ -6,8 +6,6 @@
#include <stdio.h>
#include <unistd.h>
DataFlashFileReader::DataFlashFileReader() : fd(-1) {}
bool DataFlashFileReader::open_log(const char *logfile)
{
fd = ::open(logfile, O_RDONLY);
@@ -41,6 +39,11 @@ bool DataFlashFileReader::update(char type[5])
return handle_log_format_msg(f);
}
if (!done_format_msgs) {
done_format_msgs = true;
end_format_msgs();
}
const struct log_Format &f = formats[hdr[2]];
if (f.length == 0) {
// can't just throw these away as the format specifies the