mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-10 18:03:56 -04:00
Sub: handle knowledge of in_log_download in DataFlash
This commit is contained in:
parent
ad17709390
commit
f3a717f3c0
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user