diff options
| author | QMK Bot <hello@qmk.fm> | 2022-04-21 16:34:10 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2022-04-21 16:34:10 +0000 |
| commit | bcb7e471d5f2f341f8ffbb26b0ebfd4da58cd2bb (patch) | |
| tree | 2a0fa6421efb6eae796cb70cda189de73ef973ee /quantum | |
| parent | f3ce93fe004da7027ecc244e17626dffc8758294 (diff) | |
| parent | 1e389c7904e42df36d8a2f64b315b83f70aa9b60 (diff) | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/rgblight/rgblight.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c index dc5757cb00..cc856a0e86 100644 --- a/quantum/rgblight/rgblight.c +++ b/quantum/rgblight/rgblight.c | |||
| @@ -844,18 +844,19 @@ void rgblight_unblink_all_but_layer(uint8_t layer) { | |||
| 844 | void rgblight_blink_layer_repeat_helper(void) { | 844 | void rgblight_blink_layer_repeat_helper(void) { |
| 845 | if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) { | 845 | if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) { |
| 846 | for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) { | 846 | for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) { |
| 847 | if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0 && _times_remaining > 0) { | 847 | if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0) { |
| 848 | if (_times_remaining % 2 == 1) { | 848 | if (_times_remaining % 2 == 1) { |
| 849 | rgblight_set_layer_state(layer, false); | 849 | rgblight_set_layer_state(layer, false); |
| 850 | } else { | 850 | } else { |
| 851 | rgblight_set_layer_state(layer, true); | 851 | rgblight_set_layer_state(layer, true); |
| 852 | } | 852 | } |
| 853 | _times_remaining--; | ||
| 854 | _repeat_timer = sync_timer_read() + _dur; | ||
| 855 | } | 853 | } |
| 856 | } | 854 | } |
| 855 | _times_remaining--; | ||
| 857 | if (_times_remaining <= 0) { | 856 | if (_times_remaining <= 0) { |
| 858 | _blinking_layer_mask = 0; | 857 | _blinking_layer_mask = 0; |
| 858 | } else { | ||
| 859 | _repeat_timer = sync_timer_read() + _dur; | ||
| 859 | } | 860 | } |
| 860 | } | 861 | } |
| 861 | } | 862 | } |
