From 806b6a63bf08f441f7c9671971d391d5ae645373 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Fri, 30 Apr 2021 18:30:10 -0700 Subject: [PATCH] AP_HAL: reorganize precompiler for HAL_ENABLE_LIBUAVCAN_DRIVERS and HAL_MAX_PROTOCOL_DRIVERS --- libraries/AP_HAL/AP_HAL_Boards.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index 672a99bd4c..bad3423567 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -217,7 +217,7 @@ #endif #ifndef HAL_MAX_CAN_PROTOCOL_DRIVERS -#if defined(HAL_BUILD_AP_PERIPH) || defined(HAL_BOOTLOADER_BUILD) +#if defined(HAL_BOOTLOADER_BUILD) #define HAL_MAX_CAN_PROTOCOL_DRIVERS 0 #else #define HAL_MAX_CAN_PROTOCOL_DRIVERS HAL_NUM_CAN_IFACES @@ -225,7 +225,7 @@ #endif #ifndef HAL_ENABLE_LIBUAVCAN_DRIVERS -#define HAL_ENABLE_LIBUAVCAN_DRIVERS (HAL_MAX_CAN_PROTOCOL_DRIVERS > 0) +#define HAL_ENABLE_LIBUAVCAN_DRIVERS (HAL_MAX_CAN_PROTOCOL_DRIVERS > 0) && !defined(HAL_BUILD_AP_PERIPH) #endif #ifdef HAVE_LIBDL