From f8d313cfd605fb0f17fed5b09ef89208848a15af Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Sun, 20 Jun 2021 15:58:24 +0530 Subject: [PATCH] AP_HAL_ChibiOS: Use HAL_CANMANAGER_ENABLED instead of HAL_ENABLE_LIBUAVCAN_DRIVERS --- libraries/AP_HAL_ChibiOS/CANFDIface.cpp | 2 +- libraries/AP_HAL_ChibiOS/CanIface.cpp | 2 +- libraries/AP_HAL_ChibiOS/Util.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp index 798b808cbf..9a1a29c6e7 100644 --- a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp @@ -94,7 +94,7 @@ static_assert(STM32_FDCANCLK <= 80U*1000U*1000U, "FDCAN clock must be max 80MHz" using namespace ChibiOS; -#if HAL_ENABLE_LIBUAVCAN_DRIVERS +#if HAL_CANMANAGER_ENABLED #define Debug(fmt, args...) do { AP::can().log_text(AP_CANManager::LOG_DEBUG, "CANFDIface", fmt, ##args); } while (0) #else #define Debug(fmt, args...) diff --git a/libraries/AP_HAL_ChibiOS/CanIface.cpp b/libraries/AP_HAL_ChibiOS/CanIface.cpp index 15a677c53d..183f1d720b 100644 --- a/libraries/AP_HAL_ChibiOS/CanIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CanIface.cpp @@ -70,7 +70,7 @@ #define CAN2_RX1_IRQ_Handler STM32_CAN2_RX1_HANDLER #endif // #if defined(STM32F3XX) -#if HAL_ENABLE_LIBUAVCAN_DRIVERS +#if HAL_CANMANAGER_ENABLED #define Debug(fmt, args...) do { AP::can().log_text(AP_CANManager::LOG_DEBUG, "CANIface", fmt, ##args); } while (0) #else #define Debug(fmt, args...) diff --git a/libraries/AP_HAL_ChibiOS/Util.cpp b/libraries/AP_HAL_ChibiOS/Util.cpp index 87a166f290..64e014da46 100644 --- a/libraries/AP_HAL_ChibiOS/Util.cpp +++ b/libraries/AP_HAL_ChibiOS/Util.cpp @@ -29,7 +29,7 @@ #include "sdcard.h" #include "shared_dma.h" #include -#if defined(HAL_PWM_ALARM) || HAL_DSHOT_ALARM || HAL_ENABLE_LIBUAVCAN_DRIVERS +#if defined(HAL_PWM_ALARM) || HAL_DSHOT_ALARM || HAL_CANMANAGER_ENABLED #include #endif #if HAL_ENABLE_SAVE_PERSISTENT_PARAMS @@ -167,7 +167,7 @@ bool Util::toneAlarm_init(uint8_t types) #endif _toneAlarm_types = types; -#if !defined(HAL_PWM_ALARM) && !HAL_DSHOT_ALARM && !HAL_ENABLE_LIBUAVCAN_DRIVERS +#if !defined(HAL_PWM_ALARM) && !HAL_DSHOT_ALARM && !HAL_CANMANAGER_ENABLED // Nothing to do return false; #else