AP_HAL: use minimize_features.inc for HAL_WITH_DSP

This commit is contained in:
Peter Barker 2022-06-27 17:07:48 +10:00 committed by Peter Barker
parent bb1c3d6545
commit b4d36707af
2 changed files with 10 additions and 5 deletions

View File

@ -184,12 +184,13 @@
#define BOARD_FLASH_SIZE 2048 #define BOARD_FLASH_SIZE 2048
#endif #endif
#ifndef HAL_WITH_DSP #ifndef HAL_GYROFFT_ENABLED
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || defined(HAL_BOOTLOADER_BUILD) || defined(HAL_BUILD_AP_PERIPH) || BOARD_FLASH_SIZE <= 1024 #define HAL_GYROFFT_ENABLED (BOARD_FLASH_SIZE > 1024)
#define HAL_WITH_DSP 0
#else
#define HAL_WITH_DSP !HAL_MINIMIZE_FEATURES
#endif #endif
// enable AP_GyroFFT library only if required:
#ifndef HAL_WITH_DSP
#define HAL_WITH_DSP HAL_GYROFFT_ENABLED
#endif #endif
#ifndef HAL_OS_FATFS_IO #ifndef HAL_OS_FATFS_IO

View File

@ -392,3 +392,7 @@
#ifndef HAL_WITH_EKF_DOUBLE #ifndef HAL_WITH_EKF_DOUBLE
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE #define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
#endif #endif
#ifndef HAL_GYROFFT_ENABLED
#define HAL_GYROFFT_ENABLED 0
#endif