mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Logger: removed internal error for logging without sem
This commit is contained in:
parent
dce472745e
commit
91f80613dd
@ -815,7 +815,7 @@ uint16_t AP_Logger_File::get_num_logs()
|
|||||||
void AP_Logger_File::stop_logging(void)
|
void AP_Logger_File::stop_logging(void)
|
||||||
{
|
{
|
||||||
// best-case effort to avoid annoying the IO thread
|
// 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) {
|
if (_write_fd != -1) {
|
||||||
int fd = _write_fd;
|
int fd = _write_fd;
|
||||||
_write_fd = -1;
|
_write_fd = -1;
|
||||||
@ -823,8 +823,6 @@ void AP_Logger_File::stop_logging(void)
|
|||||||
}
|
}
|
||||||
if (have_sem) {
|
if (have_sem) {
|
||||||
write_fd_semaphore.give();
|
write_fd_semaphore.give();
|
||||||
} else {
|
|
||||||
AP::internalerror().error(AP_InternalError::error_t::logger_stopping_without_sem);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user