mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Plane: stop using in_mavlink_delay as a proxy for disabling logging
This commit is contained in:
parent
4163455d97
commit
30dfd32b87
@ -2132,6 +2132,7 @@ void Plane::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) {
|
||||
@ -2150,6 +2151,7 @@ void Plane::mavlink_delay_cb()
|
||||
gcs_send_text(MAV_SEVERITY_INFO, "Initialising APM");
|
||||
}
|
||||
|
||||
DataFlash.EnableWrites(true);
|
||||
in_mavlink_delay = false;
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,9 @@ int8_t Plane::dump_log(uint8_t argc, const Menu::arg *argv)
|
||||
|
||||
int8_t Plane::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;
|
||||
}
|
||||
|
||||
|
@ -835,9 +835,6 @@ void Plane::print_comma(void)
|
||||
bool Plane::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