GCS_MAVLink: fixed log erase and log request end

This commit is contained in:
Andrew Tridgell 2014-10-01 11:45:51 +10:00
parent 2dbfc6158d
commit f6cc8ce5bc

View File

@ -130,8 +130,8 @@ void GCS_MAVLINK::handle_log_request_data(mavlink_message_t *msg, DataFlash_Clas
*/
void GCS_MAVLINK::handle_log_request_erase(mavlink_message_t *msg, DataFlash_Class &dataflash)
{
mavlink_log_request_data_t packet;
mavlink_msg_log_request_data_decode(msg, &packet);
mavlink_log_erase_t packet;
mavlink_msg_log_erase_decode(msg, &packet);
if (mavlink_check_target(packet.target_system, packet.target_component))
return;
@ -143,8 +143,8 @@ void GCS_MAVLINK::handle_log_request_erase(mavlink_message_t *msg, DataFlash_Cla
*/
void GCS_MAVLINK::handle_log_request_end(mavlink_message_t *msg, DataFlash_Class &dataflash)
{
mavlink_log_request_data_t packet;
mavlink_msg_log_request_data_decode(msg, &packet);
mavlink_log_request_end_t packet;
mavlink_msg_log_request_end_decode(msg, &packet);
if (mavlink_check_target(packet.target_system, packet.target_component))
return;
_log_sending = false;