Commit 9a30008f authored by Beat Küng's avatar Beat Küng

MAVLinkLogManager: avoid returning too early, use mavlink_logging_data_acked_t message

The return lead to data being dropped. Some of this data could have been
part of the ulog header, which lead to corrupt files.
parent bdc3dff8
......@@ -223,7 +223,6 @@ MAVLinkLogProcessor::_writeUlogMessage(QByteArray& data)
_writeData(, message_length);
data.remove(0, message_length);
return data;
return data;
......@@ -2090,8 +2090,8 @@ Vehicle::_handleMavlinkLoggingData(mavlink_message_t& message)
Vehicle::_handleMavlinkLoggingDataAcked(mavlink_message_t& message)
mavlink_logging_data_t log;
mavlink_msg_logging_data_decode(&message, &log);
mavlink_logging_data_acked_t log;
mavlink_msg_logging_data_acked_decode(&message, &log);
emit mavlinkLogData(this, log.target_system, log.target_component, log.sequence,
log.first_message_offset, QByteArray((const char*), log.length), true);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment