Filter: enable 4 filters on low-flash boards

This commit is contained in:
Andrew Tridgell 2024-12-01 11:43:23 +11:00
parent 7a0af16d6c
commit 8e1acb10fd
1 changed files with 11 additions and 9 deletions

View File

@ -2,14 +2,16 @@
#include <AP_HAL/AP_HAL_Boards.h> #include <AP_HAL/AP_HAL_Boards.h>
#ifndef AP_FILTER_NUM_FILTERS #ifndef AP_FILTER_ENABLED
#if BOARD_FLASH_SIZE > 1024 #define AP_FILTER_ENABLED BOARD_FLASH_SIZE > 1024
#define AP_FILTER_NUM_FILTERS 8
#else
#define AP_FILTER_NUM_FILTERS 0
#endif
#endif #endif
#ifndef AP_FILTER_ENABLED #if AP_FILTER_ENABLED
#define AP_FILTER_ENABLED AP_FILTER_NUM_FILTERS > 0 #ifndef AP_FILTER_NUM_FILTERS
#endif #if BOARD_FLASH_SIZE > 1024
#define AP_FILTER_NUM_FILTERS 8
#else
#define AP_FILTER_NUM_FILTERS 4
#endif // BOARD_FLASH_SIZE
#endif // AP_FILTER_NUM_FILTERS
#endif // AP_FILTER_ENABLED