diff --git a/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp b/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp index 76cbb05e32..a4a7876022 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp +++ b/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.cpp @@ -19,7 +19,7 @@ #include -#if HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES && CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS +#if AP_UAVCAN_SLCAN_ENABLED #include "AP_UAVCAN_SLCAN.h" #include @@ -568,4 +568,5 @@ void SLCAN::CANManager::reader_trampoline(void) } } -#endif //HAL_WITH_UAVCAN +#endif // AP_UAVCAN_SLCAN_ENABLED + diff --git a/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.h b/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.h index 30f682c3d4..b486bdc098 100644 --- a/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.h +++ b/libraries/AP_UAVCAN/AP_UAVCAN_SLCAN.h @@ -2,7 +2,8 @@ #pragma once #include -#if HAL_WITH_UAVCAN && CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS + +#if AP_UAVCAN_SLCAN_ENABLED #include #include "AP_HAL/utility/RingBuffer.h" @@ -235,4 +236,5 @@ public: } #include -#endif //#if HAL_WITH_UAVCAN && !HAL_MINIMIZE_FEATURES +#endif // AP_UAVCAN_SLCAN_ENABLED +