AP_CANManager: allow SITL CAN with speedup

This commit is contained in:
Andrew Tridgell 2023-08-18 06:48:52 +10:00 committed by Peter Barker
parent 9cde659545
commit 0a04043c4c
1 changed files with 1 additions and 7 deletions

View File

@ -120,13 +120,7 @@ void AP_CANManager::init()
WITH_SEMAPHORE(_sem); WITH_SEMAPHORE(_sem);
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
if (AP::sitl() != nullptr) { if (AP::sitl() == nullptr) {
if (AP::sitl()->speedup > 1) {
log_text(AP_CANManager::LOG_ERROR, LOG_TAG, "CAN is not supported under speedup.");
return;
}
} else {
AP_HAL::panic("CANManager: SITL not initialised!"); AP_HAL::panic("CANManager: SITL not initialised!");
} }
#endif #endif