Skip to content

Commit

Permalink
(#679) replaced dummy status with real status in LED handling LH
Browse files Browse the repository at this point in the history
  • Loading branch information
knmcguire committed Feb 4, 2021
1 parent 3e07b76 commit 99f8bf0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/modules/src/lighthouse/lighthouse_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,32 +154,31 @@ TESTABLE_STATIC void initializeCalibDataFromStorage();
// LED timer
static xTimerHandle timer;
static StaticTimer_t timerBuffer;
static uint8_t dummy_status = 0;
static uint8_t ledInternalStatus = 2;

static void ledTimer(xTimerHandle timer)
{
switch (dummy_status)
switch (systemStatus)
{
case 0:
if(ledInternalStatus != dummy_status)
if(ledInternalStatus != systemStatus)
{
lighthouseCoreSetLeds(lh_led_on, lh_led_off, lh_led_off);
ledInternalStatus = dummy_status;
ledInternalStatus = systemStatus;
}
break;
case 1:
if(ledInternalStatus != dummy_status)
if(ledInternalStatus != systemStatus)
{
lighthouseCoreSetLeds(lh_led_off, lh_led_on, lh_led_off);
ledInternalStatus = dummy_status;
ledInternalStatus = systemStatus;
}
break;
case 2:
if(ledInternalStatus != dummy_status)
if(ledInternalStatus != systemStatus)
{
lighthouseCoreSetLeds(lh_led_off, lh_led_off, lh_led_on);
ledInternalStatus = dummy_status;
ledInternalStatus = systemStatus;
}
break;
default:
Expand Down

0 comments on commit 99f8bf0

Please sign in to comment.