Skip to content

Commit

Permalink
Kbuild: Convert LOCODECK_NR_OF_ANCHORS to Kconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasdn committed Feb 24, 2022
1 parent 6de7b09 commit 82835c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/deck/drivers/interface/lpsTdoa2Tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
8 changes: 8 additions & 0 deletions src/deck/drivers/src/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82835c5

Please sign in to comment.