Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[led] Always breathe CSD white blinking pattern. Fixes JB#35854
The way white led blinking test in CSD tool behaves differently depending
on whether charger has been connected (breathes) or not (blinks).

Unconditionally allow breathing when PatternCsdWhiteBlink led pattern
is active so that it behaves similarly regardless of breathing settings
and/or charging status.
  • Loading branch information
spiiroin committed Aug 11, 2016
1 parent b3be273 commit 8c40c8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions mce.h
Expand Up @@ -49,8 +49,11 @@
/** LED pattern used when the battery is full */
#define MCE_LED_PATTERN_BATTERY_FULL "PatternBatteryFull"

/** LED pattern used by CSD that should always use sw breathing */
#define MCE_LED_PATTERN_CSD_BREATHING "PatternCsdLedBlink"
/** Binary LED pattern used by CSD that should always use sw breathing */
#define MCE_LED_PATTERN_CSD_BINARY_BLINK "PatternCsdLedBlink"

/** Rgb LED pattern used by CSD that should always use sw breathing */
#define MCE_LED_PATTERN_CSD_WHITE_BLINK "PatternCsdWhiteBlink"

/** LED pattern used when the battery is low */
#define MCE_LED_PATTERN_BATTERY_LOW "PatternBatteryLow"
Expand Down
8 changes: 5 additions & 3 deletions modules/led.c
Expand Up @@ -1039,9 +1039,11 @@ static bool led_pattern_should_breathe(const pattern_struct *self)
* the led_pattern_can_breathe() should catch it. */
MCE_LED_PATTERN_BATTERY_FULL,

/* The CSD test has a led pattern that should utilize
* breathing regardless of the breathing settings */
MCE_LED_PATTERN_CSD_BREATHING,
/* The CSD test has some led patterns that should utilize
* breathing regardless of the breathing settings and/or
* charging status. */
MCE_LED_PATTERN_CSD_BINARY_BLINK,
MCE_LED_PATTERN_CSD_WHITE_BLINK,
};

bool breathe = false;
Expand Down

0 comments on commit 8c40c8e

Please sign in to comment.