mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-19 14:12:01 +00:00
quantum/rgblight.c: fix rgblight_effect_rainbow_swirl() and rgblight_effect_knight()
This commit is contained in:
parent
bb2a315384
commit
81535d01e4
@ -1059,7 +1059,7 @@ void rgblight_effect_knight(animation_status_t *anim) {
|
|||||||
|
|
||||||
if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) {
|
if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) {
|
||||||
increment = -increment;
|
increment = -increment;
|
||||||
if (low_bound == 0 && increment == 1) {
|
if (increment == 1) {
|
||||||
anim->pos = 0;
|
anim->pos = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ typedef struct _animation_status_t {
|
|||||||
union {
|
union {
|
||||||
uint16_t pos16;
|
uint16_t pos16;
|
||||||
uint8_t pos;
|
uint8_t pos;
|
||||||
uint16_t current_hue;
|
int16_t current_hue;
|
||||||
uint16_t current_offset;
|
uint16_t current_offset;
|
||||||
};
|
};
|
||||||
} animation_status_t;
|
} animation_status_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user