Skip to content

Commit

Permalink
liblights: make sure to blink by default when FLASH mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tbalden authored and Daniel Hillenbrand committed May 5, 2013
1 parent cc2eee9 commit 93e790d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions liblights/lights.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ static void set_speaker_light_locked(struct light_device_t *dev,
if ((colorRGB >> 16) & 0xFF) color = LED_AMBER;
if (((colorRGB >> 8) & 0xFF) > ((colorRGB >> 16) & 0xFF)) color = LED_GREEN;

if (state->flashMode == LIGHT_FLASH_TIMED)
{
// make sure to blink by default regardless of timing
blinkMode = BLINK_MODE_NORMAL;
}

switch (state->flashOnMS) {
case PULSE_LENGTH_ALWAYS_ON:
state->flashMode = LIGHT_FLASH_NONE;
Expand Down

0 comments on commit 93e790d

Please sign in to comment.