Skip to content

Commit

Permalink
Close #212: Make LPS number of anchor configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
ataffanel committed May 18, 2017
1 parent 2452756 commit ace55eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/deck/drivers/interface/locodeck.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ typedef enum uwbEvent_e {
eventReceiveFailed,
} uwbEvent_t;

#ifndef LOCODECK_NR_OF_ANCHORS
#define LOCODECK_NR_OF_ANCHORS 6
#endif

typedef uint64_t locoAddress_t;

Expand Down
6 changes: 6 additions & 0 deletions src/deck/drivers/src/locodeck.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ static lpsAlgoOptions_t algoOptions = {
0xbccf000000000003,
0xbccf000000000004,
0xbccf000000000005,
#if LOCODECK_NR_OF_ANCHORS > 6
0xbccf000000000006,
#endif
#if LOCODECK_NR_OF_ANCHORS > 7
0xbccf000000000007,
#endif
},
.antennaDelay = (ANTENNA_OFFSET*499.2e6*128)/299792458.0, // In radio tick
.rangingFailedThreshold = 6,
Expand Down
3 changes: 3 additions & 0 deletions tools/make/config.mk.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@

## Automatically reboot to bootloader before flashing
# CLOAD_CMDS = -w radio://0/100/2M/E7E7E7E7E7

## Set number of anchor in LocoPositioningSystem
# CFLAGS += -DLOCODECK_NR_OF_ANCHORS=8

0 comments on commit ace55eb

Please sign in to comment.