Tracker: move send-logs-via-mavlink code into DataFlash

Also, fix log download
This commit is contained in:
Peter Barker 2017-06-19 08:18:18 +10:00 committed by Francisco Ferreira
parent 689a5cb238
commit 6c2bfe08cd
1 changed files with 6 additions and 2 deletions

View File

@ -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;