diff --git a/libraries/AP_EFI/AP_EFI_DroneCAN.h b/libraries/AP_EFI/AP_EFI_DroneCAN.h index 35c02d5e37..d1ec432ccc 100644 --- a/libraries/AP_EFI/AP_EFI_DroneCAN.h +++ b/libraries/AP_EFI/AP_EFI_DroneCAN.h @@ -3,10 +3,6 @@ #include "AP_EFI.h" #include "AP_EFI_Backend.h" -#ifndef HAL_EFI_DRONECAN_ENABLED -#define HAL_EFI_DRONECAN_ENABLED HAL_MAX_CAN_PROTOCOL_DRIVERS && BOARD_FLASH_SIZE > 1024 && HAL_CANMANAGER_ENABLED -#endif - #if HAL_EFI_DRONECAN_ENABLED #include #include diff --git a/libraries/AP_EFI/AP_EFI_config.h b/libraries/AP_EFI/AP_EFI_config.h index 37669582f6..c85584373a 100644 --- a/libraries/AP_EFI/AP_EFI_config.h +++ b/libraries/AP_EFI/AP_EFI_config.h @@ -6,6 +6,14 @@ #define HAL_EFI_ENABLED !HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024 #endif -#ifndef AP_EFI_SCRIPTING_ENABLED -#define AP_EFI_SCRIPTING_ENABLED (HAL_EFI_ENABLED && AP_SCRIPTING_ENABLED) +#ifndef AP_EFI_BACKEND_DEFAULT_ENABLED +#define AP_EFI_BACKEND_DEFAULT_ENABLED HAL_EFI_ENABLED +#endif + +#ifndef HAL_EFI_DRONECAN_ENABLED +#define HAL_EFI_DRONECAN_ENABLED AP_EFI_BACKEND_DEFAULT_ENABLED && HAL_MAX_CAN_PROTOCOL_DRIVERS && BOARD_FLASH_SIZE > 1024 && HAL_CANMANAGER_ENABLED +#endif + +#ifndef AP_EFI_SCRIPTING_ENABLED +#define AP_EFI_SCRIPTING_ENABLED (AP_EFI_BACKEND_DEFAULT_ENABLED && AP_SCRIPTING_ENABLED) #endif