Sub: StartUnstartedLogging replaces logging_started/start_logging

This commit is contained in:
Peter Barker 2017-06-09 15:45:23 +10:00 committed by Francisco Ferreira
parent 76f7ad1252
commit c1583da7d5
2 changed files with 2 additions and 6 deletions

View File

@ -479,9 +479,7 @@ void Sub::start_logging()
// dataflash may have stopped logging - when we get_log_data,
// for example. Always try to restart:
if (!DataFlash.logging_started()) {
DataFlash.StartNewLog();
}
DataFlash.StartUnstartedLogging();
}
void Sub::log_init(void)

View File

@ -300,9 +300,7 @@ bool Sub::should_log(uint32_t mask)
if (!motors.armed() && !DataFlash.log_while_disarmed()) {
return false;
}
if (!DataFlash.logging_started()) {
start_logging();
}
start_logging();
return true;
#else
return false;