Sub: stop using in_mavlink_delay as a proxy for disabling logging

This commit is contained in:
Peter Barker 2017-06-15 12:09:08 +10:00 committed by Francisco Ferreira
parent 31ac03368d
commit 75a89dbfeb
2 changed files with 2 additions and 3 deletions

View File

@ -1828,6 +1828,7 @@ void Sub::mavlink_delay_cb()
}
in_mavlink_delay = true;
DataFlash.EnableWrites(false);
uint32_t tnow = millis();
if (tnow - last_1hz > 1000) {
@ -1847,6 +1848,7 @@ void Sub::mavlink_delay_cb()
gcs_send_text(MAV_SEVERITY_INFO, "Initialising APM");
}
DataFlash.EnableWrites(true);
in_mavlink_delay = false;
}

View File

@ -291,9 +291,6 @@ bool Sub::optflow_position_ok()
bool Sub::should_log(uint32_t mask)
{
#if LOGGING_ENABLED == ENABLED
if (in_mavlink_delay) {
return false;
}
if (!(mask & g.log_bitmask)) {
return false;
}