Sub: handle knowledge of in_log_download in DataFlash

This commit is contained in:
Peter Barker 2017-06-19 09:25:10 +10:00 committed by Francisco Ferreira
parent ad17709390
commit f3a717f3c0
3 changed files with 1 additions and 20 deletions

View File

@ -1635,22 +1635,6 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg)
break; break;
} }
case MAVLINK_MSG_ID_LOG_REQUEST_DATA:
case MAVLINK_MSG_ID_LOG_ERASE:
sub.in_log_download = true;
/* no break */
case MAVLINK_MSG_ID_LOG_REQUEST_LIST:
if (!sub.in_mavlink_delay && !sub.motors.armed()) {
sub.DataFlash.handle_mavlink_msg(*this, msg);
}
break;
case MAVLINK_MSG_ID_LOG_REQUEST_END:
sub.in_log_download = false;
if (!sub.in_mavlink_delay && !sub.motors.armed()) {
sub.DataFlash.handle_mavlink_msg(*this, msg);
}
break;
case MAVLINK_MSG_ID_SERIAL_CONTROL: case MAVLINK_MSG_ID_SERIAL_CONTROL:
handle_serial_control(msg, sub.gps); handle_serial_control(msg, sub.gps);
break; break;

View File

@ -471,7 +471,7 @@ void Sub::start_logging()
if (g.log_bitmask == 0) { if (g.log_bitmask == 0) {
return; return;
} }
if (in_log_download) { if (DataFlash.in_log_download()) {
return; return;
} }

View File

@ -145,9 +145,6 @@ private:
// AP_Notify instance // AP_Notify instance
AP_Notify notify; AP_Notify notify;
// has a log download started?
bool in_log_download;
// primary input control channels // primary input control channels
RC_Channel *channel_roll; RC_Channel *channel_roll;
RC_Channel *channel_pitch; RC_Channel *channel_pitch;