AP_Logger: removed internal error for logging without sem

This commit is contained in:
Andrew Tridgell 2019-06-06 13:49:11 +10:00
parent dce472745e
commit 91f80613dd
1 changed files with 1 additions and 3 deletions

View File

@ -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)
}
if (have_sem) {
write_fd_semaphore.give();
} else {
AP::internalerror().error(AP_InternalError::error_t::logger_stopping_without_sem);
}
}