mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 00:23:34 +08:00
replay: add replay module, build for sitl_default, but do not load on startup
This adds a new module that does: - read an parse an ULog file, given via ENV variable 'replay' - apply all parameters from the log file - read and apply user-defined override parameters from a file - publish all messages in 'real-time' from the log file and add a constant offset to the timestamp to match the system time. - apply changed parameters in the log (which are not overridden)
This commit is contained in:
@@ -49,14 +49,18 @@ enum class ULogMessageType : uint8_t {
|
||||
/* declare message data structs with byte alignment (no padding) */
|
||||
#pragma pack(push, 1)
|
||||
|
||||
#define ULOG_MSG_HEADER_LEN 3 //accounts for msg_size and msg_type
|
||||
|
||||
/** first bytes of the file */
|
||||
struct ulog_file_header_s {
|
||||
uint8_t magic[8];
|
||||
uint64_t timestamp;
|
||||
};
|
||||
|
||||
#define ULOG_MSG_HEADER_LEN 3 //accounts for msg_size and msg_type
|
||||
struct ulog_message_header_s {
|
||||
uint16_t msg_size;
|
||||
uint8_t msg_type;
|
||||
};
|
||||
|
||||
struct ulog_message_format_s {
|
||||
uint16_t msg_size; //size of message - ULOG_MSG_HEADER_LEN
|
||||
uint8_t msg_type = static_cast<uint8_t>(ULogMessageType::FORMAT);
|
||||
|
||||
Reference in New Issue
Block a user