mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 14:41:36 +08:00
logger: add Ulog sync bytes at 1Hz and tagged log message definition (#12144)
This commit is contained in:
@@ -44,6 +44,7 @@ enum class ULogMessageType : uint8_t {
|
||||
SYNC = 'S',
|
||||
DROPOUT = 'O',
|
||||
LOGGING = 'L',
|
||||
LOGGING_TAGGED = 'C',
|
||||
FLAG_BITS = 'B',
|
||||
};
|
||||
|
||||
@@ -133,6 +134,16 @@ struct ulog_message_logging_s {
|
||||
char message[128]; //defines the maximum length of a logged message string
|
||||
};
|
||||
|
||||
struct ulog_message_logging_tagged_s {
|
||||
uint16_t msg_size; //size of message - ULOG_MSG_HEADER_LEN
|
||||
uint8_t msg_type = static_cast<uint8_t>(ULogMessageType::LOGGING_TAGGED);
|
||||
|
||||
uint8_t log_level; //same levels as in the linux kernel
|
||||
uint16_t tag;
|
||||
uint64_t timestamp;
|
||||
char message[128]; //defines the maximum length of a logged message string
|
||||
};
|
||||
|
||||
struct ulog_message_parameter_header_s {
|
||||
uint16_t msg_size;
|
||||
uint8_t msg_type = static_cast<uint8_t>(ULogMessageType::PARAMETER);
|
||||
|
||||
Reference in New Issue
Block a user