diff --git a/libraries/AP_CANManager/AP_CANManager.cpp b/libraries/AP_CANManager/AP_CANManager.cpp index a39d4d1f6b6e11..9efeb016546831 100644 --- a/libraries/AP_CANManager/AP_CANManager.cpp +++ b/libraries/AP_CANManager/AP_CANManager.cpp @@ -43,14 +43,6 @@ #include #include -/* - avoid a recursion issue with config defines - */ -#if AP_CAN_LOGGING_ENABLED && !HAL_LOGGING_ENABLED -#undef AP_CAN_LOGGING_ENABLED -#define AP_CAN_LOGGING_ENABLED 0 -#endif - #define LOG_TAG "CANMGR" #define LOG_BUFFER_SIZE 1024 diff --git a/libraries/AP_CANManager/AP_CANManager_config.h b/libraries/AP_CANManager/AP_CANManager_config.h index 383abe0041dc9f..a33ff66888a0d1 100644 --- a/libraries/AP_CANManager/AP_CANManager_config.h +++ b/libraries/AP_CANManager/AP_CANManager_config.h @@ -1,12 +1,12 @@ #pragma once #include +#include #ifndef AP_CAN_SLCAN_ENABLED #define AP_CAN_SLCAN_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS #endif #ifndef AP_CAN_LOGGING_ENABLED -#define AP_CAN_LOGGING_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS +#define AP_CAN_LOGGING_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS && HAL_LOGGING_ENABLED #endif -