diff --git a/src/deck/drivers/interface/lpsTdoa2Tag.h b/src/deck/drivers/interface/lpsTdoa2Tag.h index c0f76596e8..5c8d78d771 100644 --- a/src/deck/drivers/interface/lpsTdoa2Tag.h +++ b/src/deck/drivers/interface/lpsTdoa2Tag.h @@ -6,13 +6,11 @@ #include "mac.h" +#include "autoconf.h" + extern uwbAlgorithm_t uwbTdoa2TagAlgorithm; -#ifdef LOCODECK_NR_OF_ANCHORS -#define LOCODECK_NR_OF_TDOA2_ANCHORS LOCODECK_NR_OF_ANCHORS -#else -#define LOCODECK_NR_OF_TDOA2_ANCHORS 8 -#endif +#define LOCODECK_NR_OF_TDOA2_ANCHORS CONFIG_DECK_LOCO_NR_OF_ANCHORS typedef struct { const locoAddress_t anchorAddress[LOCODECK_NR_OF_TDOA2_ANCHORS]; diff --git a/src/deck/drivers/src/Kconfig b/src/deck/drivers/src/Kconfig index 8ab2ecca2c..da6f1a4633 100644 --- a/src/deck/drivers/src/Kconfig +++ b/src/deck/drivers/src/Kconfig @@ -131,6 +131,14 @@ config DECK_LOCO on-board of the Crazyflie and there is no need for an external computer for position estimation. + config DECK_LOCO_NR_OF_ANCHORS + int "The number of anchors in use" + default 8 + depends on DECK_LOCO + help + The number of anchors in your Loco setup. See documentation on + https://www.bitcraze.io/ for more details. + choice prompt "Algorithm to use" depends on DECK_LOCO