diff --git a/ArduSub/GCS_Mavlink.cpp b/ArduSub/GCS_Mavlink.cpp index 6d5d56efa5..45bebfdb54 100644 --- a/ArduSub/GCS_Mavlink.cpp +++ b/ArduSub/GCS_Mavlink.cpp @@ -1635,22 +1635,6 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg) 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: handle_serial_control(msg, sub.gps); break; diff --git a/ArduSub/Log.cpp b/ArduSub/Log.cpp index 500eacc50c..1f83999fa4 100644 --- a/ArduSub/Log.cpp +++ b/ArduSub/Log.cpp @@ -471,7 +471,7 @@ void Sub::start_logging() if (g.log_bitmask == 0) { return; } - if (in_log_download) { + if (DataFlash.in_log_download()) { return; } diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index 08aa190549..d4417a3b1b 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -145,9 +145,6 @@ private: // AP_Notify instance AP_Notify notify; - // has a log download started? - bool in_log_download; - // primary input control channels RC_Channel *channel_roll; RC_Channel *channel_pitch;