From 81535d01e437cf48252b1085bf8fd3be61cb520e Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Mon, 11 Mar 2019 17:24:05 +0900 Subject: [PATCH] quantum/rgblight.c: fix rgblight_effect_rainbow_swirl() and rgblight_effect_knight() --- quantum/rgblight.c | 2 +- quantum/rgblight.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f933b931c1..22bebcd170 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -1059,7 +1059,7 @@ void rgblight_effect_knight(animation_status_t *anim) { if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { increment = -increment; - if (low_bound == 0 && increment == 1) { + if (increment == 1) { anim->pos = 0; } } diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 2352738679..bd0d21e1d1 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -268,7 +268,7 @@ typedef struct _animation_status_t { union { uint16_t pos16; uint8_t pos; - uint16_t current_hue; + int16_t current_hue; uint16_t current_offset; }; } animation_status_t;