Skip to content

Commit

Permalink
Filter: enable 4 filters on low-flash boards
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Dec 1, 2024
1 parent 96a1a02 commit 6c0e20c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions libraries/Filter/AP_Filter_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

#include <AP_HAL/AP_HAL_Boards.h>

#ifndef AP_FILTER_NUM_FILTERS
#if BOARD_FLASH_SIZE > 1024
#define AP_FILTER_NUM_FILTERS 8
#else
#define AP_FILTER_NUM_FILTERS 0
#endif
#endif

#ifndef AP_FILTER_ENABLED
#define AP_FILTER_ENABLED AP_FILTER_NUM_FILTERS > 0
#define AP_FILTER_ENABLED BOARD_FLASH_SIZE > 1024
#endif

#if AP_FILTER_ENABLED
#ifndef AP_FILTER_NUM_FILTERS
#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

0 comments on commit 6c0e20c

Please sign in to comment.