mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 10:00:35 +08:00
ULog: add INFO_MULTIPLE & FLAG_BITS messages
This requires support in the parsers, and thus the ULog file version is increased. As long as no data is appended, both, existing pyulog & FlightPlot, can still read the new logs (they will output a warning). The replay module will print an error, but still continue.
This commit is contained in:
@@ -1639,10 +1639,20 @@ void Logger::write_header()
|
||||
header.magic[4] = 0x01;
|
||||
header.magic[5] = 0x12;
|
||||
header.magic[6] = 0x35;
|
||||
header.magic[7] = 0x00; //file version 0
|
||||
header.magic[7] = 0x01; //file version 1
|
||||
header.timestamp = hrt_absolute_time();
|
||||
_writer.lock();
|
||||
write_message(&header, sizeof(header));
|
||||
|
||||
// write the Flags message: this MUST be written right after the ulog header
|
||||
ulog_message_flag_bits_s flag_bits;
|
||||
|
||||
memset(&flag_bits, 0, sizeof(flag_bits));
|
||||
flag_bits.msg_size = sizeof(flag_bits) - ULOG_MSG_HEADER_LEN;
|
||||
flag_bits.msg_type = static_cast<uint8_t>(ULogMessageType::FLAG_BITS);
|
||||
|
||||
write_message(&flag_bits, sizeof(flag_bits));
|
||||
|
||||
_writer.unlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user