Skip to content

Commit

Permalink
[CI] Format code according to conventions (qmk#12731)
Browse files Browse the repository at this point in the history
Co-authored-by: QMK Bot <hello@qmk.fm>
  • Loading branch information
github-actions[bot] and qmk-bot authored Apr 29, 2021
1 parent 09024fc commit a454265
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
9 changes: 4 additions & 5 deletions quantum/led_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ last_hit_t g_last_hit_tracker;
#endif // LED_MATRIX_KEYREACTIVE_ENABLED

// internals
static bool suspend_state = false;
static bool suspend_state = false;
static uint8_t led_last_enable = UINT8_MAX;
static uint8_t led_last_effect = UINT8_MAX;
static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
Expand Down Expand Up @@ -324,12 +324,11 @@ void led_matrix_task(void) {

// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
bool suspend_backlight =
suspend_state ||
bool suspend_backlight = suspend_state ||
#if LED_DISABLE_TIMEOUT > 0
(led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
(led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
#endif // LED_DISABLE_TIMEOUT > 0
false;
false;

uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode;

Expand Down
9 changes: 4 additions & 5 deletions quantum/rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ last_hit_t g_last_hit_tracker;
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED

// internals
static bool suspend_state = false;
static bool suspend_state = false;
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
Expand Down Expand Up @@ -409,12 +409,11 @@ void rgb_matrix_task(void) {

// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
bool suspend_backlight =
suspend_state ||
bool suspend_backlight = suspend_state ||
#if RGB_DISABLE_TIMEOUT > 0
(rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
(rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
#endif // RGB_DISABLE_TIMEOUT > 0
false;
false;

uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode;

Expand Down
4 changes: 2 additions & 2 deletions tmk_core/common/avr/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
# if defined(RGB_MATRIX_ENABLE)
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
# endif
#endif

suspend_wakeup_init_kb();
}
Expand Down
8 changes: 4 additions & 4 deletions tmk_core/common/chibios/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ void suspend_power_down(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
#endif
# if defined(RGB_MATRIX_ENABLE)
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(true);
# endif
#endif
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif /* AUDIO_ENABLE */
Expand Down Expand Up @@ -154,8 +154,8 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
# if defined(RGB_MATRIX_ENABLE)
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
# endif
#endif
suspend_wakeup_init_kb();
}

0 comments on commit a454265

Please sign in to comment.