Copter: stop using in_mavlink_delay as a proxy for disabling logging
This commit is contained in:
parent
aeacc11573
commit
4163455d97
@ -2042,6 +2042,7 @@ void Copter::mavlink_delay_cb()
|
||||
if (!gcs_chan[0].initialised || in_mavlink_delay) return;
|
||||
|
||||
in_mavlink_delay = true;
|
||||
DataFlash.EnableWrites(false);
|
||||
|
||||
uint32_t tnow = millis();
|
||||
if (tnow - last_1hz > 1000) {
|
||||
@ -2062,6 +2063,7 @@ void Copter::mavlink_delay_cb()
|
||||
}
|
||||
check_usb_mux();
|
||||
|
||||
DataFlash.EnableWrites(true);
|
||||
in_mavlink_delay = false;
|
||||
}
|
||||
|
||||
|
@ -87,9 +87,9 @@ int8_t Copter::dump_log(uint8_t argc, const Menu::arg *argv)
|
||||
|
||||
int8_t Copter::erase_logs(uint8_t argc, const Menu::arg *argv)
|
||||
{
|
||||
in_mavlink_delay = true;
|
||||
DataFlash.EnableWrites(false);
|
||||
do_erase_logs();
|
||||
in_mavlink_delay = false;
|
||||
DataFlash.EnableWrites(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -491,9 +491,6 @@ void Copter::check_usb_mux(void)
|
||||
bool Copter::should_log(uint32_t mask)
|
||||
{
|
||||
#if LOGGING_ENABLED == ENABLED
|
||||
if (in_mavlink_delay) {
|
||||
return false;
|
||||
}
|
||||
if (!(mask & g.log_bitmask)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user