diff options
| author | Yang Liu <i@yangliu.name> | 2016-01-24 17:19:33 -0800 |
|---|---|---|
| committer | Yang Liu <i@yangliu.name> | 2016-01-24 17:19:33 -0800 |
| commit | 2647c7cd84820a833b85e41ea86caf76b36e6ee1 (patch) | |
| tree | c613b1e565a22627135e19e819b045f2513d7f5c | |
| parent | ba9ac457b2159097ecfd9848c5171c52e3a68260 (diff) | |
| download | qmk_firmware-2647c7cd84820a833b85e41ea86caf76b36e6ee1.tar.gz qmk_firmware-2647c7cd84820a833b85e41ea86caf76b36e6ee1.zip | |
fix bugs in animation effects
| -rw-r--r-- | quantum/rgblight.c | 2 | ||||
| -rw-r--r-- | quantum/rgblight.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 552456aae..2215cf5cd 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -445,7 +445,7 @@ void rgblight_effect_snake(uint8_t interval) { | |||
| 445 | rgblight_set(); | 445 | rgblight_set(); |
| 446 | if (increament == 1) { | 446 | if (increament == 1) { |
| 447 | if (pos - 1 < 0) { | 447 | if (pos - 1 < 0) { |
| 448 | pos = 13; | 448 | pos = RGBLED_NUM-1; |
| 449 | } else { | 449 | } else { |
| 450 | pos -= 1; | 450 | pos -= 1; |
| 451 | } | 451 | } |
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index fd39ead09..9e1562328 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7 | 13 | #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7 |
| 14 | #endif | 14 | #endif |
| 15 | #ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET | 15 | #ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET |
| 16 | #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 11 | 16 | #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 9 |
| 17 | #endif | 17 | #endif |
| 18 | 18 | ||
| 19 | #ifndef RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH | 19 | #ifndef RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH |
