Skip to content

Commit

Permalink
Fixes #439: Add Lighthouse deck init parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ataffanel committed Jul 1, 2019
1 parent fd18d16 commit 2a67c32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/deck/drivers/src/lighthouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "system.h"
#include "deck.h"
#include "log.h"
#include "param.h"

#include "config.h"
#include "FreeRTOS.h"
Expand Down Expand Up @@ -68,6 +69,8 @@ baseStationGeometry_t lighthouseBaseStationsGeometry[2] = {
// Uncomment if you want to force the Crazyflie to reflash the deck at each startup
// #define FORCE_FLASH true

static bool isInit = false;

#if DISABLE_LIGHTHOUSE_DRIVER == 0

#ifndef FORCE_FLASH
Expand Down Expand Up @@ -101,8 +104,6 @@ INCBIN(bitstream, "lighthouse.bin");

static void checkVersionAndBoot();

static bool isInit = false;

static pulseProcessorResult_t angles[PULSE_PROCESSOR_N_SENSORS];

// Stats
Expand Down Expand Up @@ -402,5 +403,8 @@ LOG_ADD(LOG_UINT16, width3, &pulseWidth[3])
#endif
LOG_GROUP_STOP(lighthouse)


#endif // DISABLE_LIGHTHOUSE_DRIVER

PARAM_GROUP_START(deck)
PARAM_ADD(PARAM_UINT8 | PARAM_RONLY, bdLighthouse4, &isInit)
PARAM_GROUP_STOP(deck)

0 comments on commit 2a67c32

Please sign in to comment.