mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
logger: avoid logging the padding if it's at the end of a message format
This commit is contained in:
1 parent
bd96afa00b
commit
a9930c2173
1 file changed
+1
-2
@@ -527,8 +527,7 @@ void Logger::run()
|
||||
for (LoggerSubscription &sub : _subscriptions) {
|
||||
/* each message consists of a header followed by an orb data object
|
||||
*/
|
||||
size_t msg_size = sizeof(message_data_header_s) + sub.metadata->o_size;
|
||||
//TODO: use sub.metadata->o_size_no_padding
|
||||
size_t msg_size = sizeof(message_data_header_s) + sub.metadata->o_size_no_padding;
|
||||
uint8_t buffer[msg_size];
|
||||
|
||||
/* if this topic has been updated, copy the new data into the message buffer
|
||||
|
||||
Reference in new issue
Block a user