]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
fix bugs in animation effects
authorYang Liu <i@yangliu.name>
Mon, 25 Jan 2016 01:19:33 +0000 (17:19 -0800)
committerYang Liu <i@yangliu.name>
Mon, 25 Jan 2016 01:19:33 +0000 (17:19 -0800)
quantum/rgblight.c
quantum/rgblight.h

index 552456aae3c9f6ce80da57c80ad68e1466f6d4a8..2215cf5cdf8e15431bc9766f845bfb595e14d53c 100644 (file)
@@ -445,7 +445,7 @@ void rgblight_effect_snake(uint8_t interval) {
        rgblight_set();
        if (increament == 1) {
                if (pos - 1 < 0) {
-                       pos = 13;
+                       pos = RGBLED_NUM-1;
                } else {
                        pos -= 1;
                }
index fd39ead09fcd97e59fb8717025e43c8450682fb0..9e1562328ff4dffbce5c1a18fefa8c3f1f6d86a2 100644 (file)
@@ -13,7 +13,7 @@
 #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
 #endif
 #ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
-#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 11
+#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 9
 #endif
 
 #ifndef RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH