Skip to content

Commit

Permalink
#315 Make sure TDoA data can handled the first seconds the system is …
Browse files Browse the repository at this point in the history
…running
  • Loading branch information
krichardsson committed May 23, 2018
1 parent 4095cd6 commit 5f099e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/deck/drivers/src/lpsTdoaTagEngine.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ static uint8_t getSeqNr(const anchorInfo_t* anchorCtx) {

static bool getAnchorPosition(const anchorInfo_t* anchorCtx, point_t* position) {
uint32_t now = xTaskGetTickCount();
uint32_t validCreationTime = now - ANCHOR_POSITION_VALIDITY_PERIOD;
if (anchorCtx->position.timestamp > validCreationTime) {
int32_t validCreationTime = now - ANCHOR_POSITION_VALIDITY_PERIOD;
if ((int32_t)anchorCtx->position.timestamp > validCreationTime) {
position->x = anchorCtx->position.x;
position->y = anchorCtx->position.y;
position->z = anchorCtx->position.z;
Expand Down

0 comments on commit 5f099e8

Please sign in to comment.