Browse Source

Sub: handle knowledge of in_log_download in DataFlash

mission-4.1.18
Peter Barker 8 years ago committed by Francisco Ferreira
parent
commit
f3a717f3c0
  1. 16
      ArduSub/GCS_Mavlink.cpp
  2. 2
      ArduSub/Log.cpp
  3. 3
      ArduSub/Sub.h

16
ArduSub/GCS_Mavlink.cpp

@ -1635,22 +1635,6 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg) @@ -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;

2
ArduSub/Log.cpp

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

3
ArduSub/Sub.h

@ -145,9 +145,6 @@ private: @@ -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;

Loading…
Cancel
Save