From 6c2bfe08cd5ed4edc437cc4f93f4624a155ffbcc Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 19 Jun 2017 08:18:18 +1000 Subject: [PATCH] Tracker: move send-logs-via-mavlink code into DataFlash Also, fix log download --- AntennaTracker/GCS_Mavlink.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AntennaTracker/GCS_Mavlink.cpp b/AntennaTracker/GCS_Mavlink.cpp index 079b34edac..74e87af95f 100644 --- a/AntennaTracker/GCS_Mavlink.cpp +++ b/AntennaTracker/GCS_Mavlink.cpp @@ -376,6 +376,10 @@ GCS_MAVLINK_Tracker::data_stream_send(void) return; } + if (!tracker.in_mavlink_delay) { + tracker.DataFlash.handle_log_send(*this); + } + if (stream_trigger(STREAM_RAW_SENSORS)) { send_message(MSG_RAW_IMU1); send_message(MSG_RAW_IMU2); @@ -838,13 +842,13 @@ mission_failed: /* no break */ case MAVLINK_MSG_ID_LOG_REQUEST_LIST: if (!tracker.in_mavlink_delay) { - handle_log_message(msg, tracker.DataFlash); + tracker.DataFlash.handle_mavlink_msg(*this, msg); } break; case MAVLINK_MSG_ID_LOG_REQUEST_END: tracker.in_log_download = false; if (!tracker.in_mavlink_delay) { - handle_log_message(msg, tracker.DataFlash); + tracker.DataFlash.handle_mavlink_msg(*this, msg); } break;