AP_EF: correct builds when AP_EFI_ENABLED is false

dronecan backend was not checking for HAL_EFI_ENABLED
This commit is contained in:
Peter Barker 2023-03-11 13:20:58 +11:00 committed by Andrew Tridgell
parent c039c349e3
commit 3eb9515aaf
2 changed files with 10 additions and 6 deletions

View File

@ -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 <AP_UAVCAN/AP_UAVCAN.h>
#include <uavcan/equipment/ice/reciprocating/Status.hpp>

View File

@ -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