Tracker: stop using in_mavlink_delay as a proxy for disabling logging

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

View File

@ -889,6 +889,7 @@ void Tracker::mavlink_delay_cb()
if (!gcs_chan[0].initialised) return; if (!gcs_chan[0].initialised) return;
tracker.in_mavlink_delay = true; tracker.in_mavlink_delay = true;
DataFlash.EnableWrites(false);
uint32_t tnow = AP_HAL::millis(); uint32_t tnow = AP_HAL::millis();
if (tnow - last_1hz > 1000) { if (tnow - last_1hz > 1000) {
@ -906,6 +907,7 @@ void Tracker::mavlink_delay_cb()
last_5s = tnow; last_5s = tnow;
gcs_send_text(MAV_SEVERITY_INFO, "Initialising APM"); gcs_send_text(MAV_SEVERITY_INFO, "Initialising APM");
} }
DataFlash.EnableWrites(true);
tracker.in_mavlink_delay = false; tracker.in_mavlink_delay = false;
} }

View File

@ -253,9 +253,6 @@ void Tracker::check_usb_mux(void)
*/ */
bool Tracker::should_log(uint32_t mask) bool Tracker::should_log(uint32_t mask)
{ {
if (in_mavlink_delay) {
return false;
}
if (!(mask & g.log_bitmask)) { if (!(mask & g.log_bitmask)) {
return false; return false;
} }