From 10fb5d6b21b77cbfe08d4649fba5745d12201b4b Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Mon, 9 Jan 2023 10:00:09 +1100 Subject: [PATCH] AP_HAL: enable virtual CAN for native built linux targets --- libraries/AP_HAL/board/linux.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_HAL/board/linux.h b/libraries/AP_HAL/board/linux.h index c36205d737..989b768c53 100644 --- a/libraries/AP_HAL/board/linux.h +++ b/libraries/AP_HAL/board/linux.h @@ -396,3 +396,10 @@ #ifndef HAL_GYROFFT_ENABLED #define HAL_GYROFFT_ENABLED 0 #endif + +#if (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NONE) && HAL_FORCE_32BIT +// we can use virtual CAN on native builds +#define HAL_LINUX_USE_VIRTUAL_CAN 1 +#else +#define HAL_LINUX_USE_VIRTUAL_CAN 0 +#endif