mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-17 17:11:36 +08:00
logger: subscribe to mavlink_log messages and write them to the log
This commit is contained in:
@@ -42,6 +42,7 @@ enum class MessageType : uint8_t {
|
||||
REMOVE_LOGGED_MSG = 'R',
|
||||
SYNC = 'S',
|
||||
DROPOUT = 'O',
|
||||
LOGGING = 'L',
|
||||
};
|
||||
|
||||
|
||||
@@ -108,6 +109,15 @@ struct message_info_header_s {
|
||||
char key[255];
|
||||
};
|
||||
|
||||
struct message_logging_s {
|
||||
uint16_t msg_size; //size of message - MSG_HEADER_LEN
|
||||
uint8_t msg_type = static_cast<uint8_t>(MessageType::LOGGING);
|
||||
|
||||
uint8_t log_level; //same levels as in the linux kernel
|
||||
uint64_t timestamp;
|
||||
char message[255];
|
||||
};
|
||||
|
||||
struct message_parameter_header_s {
|
||||
uint16_t msg_size;
|
||||
uint8_t msg_type = static_cast<uint8_t>(MessageType::PARAMETER);
|
||||
|
||||
Reference in New Issue
Block a user