Browse Source

AP_Logger: removed internal error for logging without sem

mission-4.1.18
Andrew Tridgell 6 years ago
parent
commit
91f80613dd
  1. 4
      libraries/AP_Logger/AP_Logger_File.cpp

4
libraries/AP_Logger/AP_Logger_File.cpp

@ -815,7 +815,7 @@ uint16_t AP_Logger_File::get_num_logs() @@ -815,7 +815,7 @@ uint16_t AP_Logger_File::get_num_logs()
void AP_Logger_File::stop_logging(void)
{
// best-case effort to avoid annoying the IO thread
const bool have_sem = write_fd_semaphore.take(1);
const bool have_sem = write_fd_semaphore.take(hal.util->get_soft_armed()?1:20);
if (_write_fd != -1) {
int fd = _write_fd;
_write_fd = -1;
@ -823,8 +823,6 @@ void AP_Logger_File::stop_logging(void) @@ -823,8 +823,6 @@ void AP_Logger_File::stop_logging(void)
}
if (have_sem) {
write_fd_semaphore.give();
} else {
AP::internalerror().error(AP_InternalError::error_t::logger_stopping_without_sem);
}
}

Loading…
Cancel
Save