From 2d00ab35721e534cd42b5931593be4f470c1036f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 3 Jan 2025 20:26:26 +1100 Subject: [PATCH] AP_CANMananger: fix awful defaulting of AP_CAN_LOGGING_ENABLED --- libraries/AP_CANManager/AP_CANManager.cpp | 8 -------- libraries/AP_CANManager/AP_CANManager_config.h | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) 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 -