fix bugs in animation effects

This commit is contained in:
Yang Liu 2016-01-24 17:19:33 -08:00
parent ba9ac457b2
commit 2647c7cd84
2 changed files with 2 additions and 2 deletions

View file

@ -445,7 +445,7 @@ void rgblight_effect_snake(uint8_t interval) {
rgblight_set(); rgblight_set();
if (increament == 1) { if (increament == 1) {
if (pos - 1 < 0) { if (pos - 1 < 0) {
pos = 13; pos = RGBLED_NUM-1;
} else { } else {
pos -= 1; pos -= 1;
} }

View file

@ -13,7 +13,7 @@
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7 #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
#endif #endif
#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET #ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 11 #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 9
#endif #endif
#ifndef RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH #ifndef RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH