diff options
Diffstat (limited to 'quantum/rgblight.c')
-rw-r--r-- | quantum/rgblight.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 8c9ad7736..c29ffedc3 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
@@ -42,7 +42,7 @@ void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) { | |||
42 | The DIM_CURVE is used only on brightness/value and on saturation (inverted). | 42 | The DIM_CURVE is used only on brightness/value and on saturation (inverted). |
43 | This looks the most natural. | 43 | This looks the most natural. |
44 | */ | 44 | */ |
45 | uint8_t r, g, b; | 45 | uint8_t r = 0, g = 0, b = 0; |
46 | 46 | ||
47 | val = pgm_read_byte(&DIM_CURVE[val]); | 47 | val = pgm_read_byte(&DIM_CURVE[val]); |
48 | sat = 255 - pgm_read_byte(&DIM_CURVE[255 - sat]); | 48 | sat = 255 - pgm_read_byte(&DIM_CURVE[255 - sat]); |
@@ -154,7 +154,7 @@ void rgblight_init(void) { | |||
154 | } | 154 | } |
155 | 155 | ||
156 | void rgblight_increase(void) { | 156 | void rgblight_increase(void) { |
157 | uint8_t mode; | 157 | uint8_t mode = 0; |
158 | if (rgblight_config.mode < RGBLIGHT_MODES) { | 158 | if (rgblight_config.mode < RGBLIGHT_MODES) { |
159 | mode = rgblight_config.mode + 1; | 159 | mode = rgblight_config.mode + 1; |
160 | } | 160 | } |
@@ -162,7 +162,7 @@ void rgblight_increase(void) { | |||
162 | } | 162 | } |
163 | 163 | ||
164 | void rgblight_decrease(void) { | 164 | void rgblight_decrease(void) { |
165 | uint8_t mode; | 165 | uint8_t mode = 0; |
166 | if (rgblight_config.mode > 1) { //mode will never < 1, if mode is less than 1, eeprom need to be initialized. | 166 | if (rgblight_config.mode > 1) { //mode will never < 1, if mode is less than 1, eeprom need to be initialized. |
167 | mode = rgblight_config.mode-1; | 167 | mode = rgblight_config.mode-1; |
168 | } | 168 | } |
@@ -170,7 +170,7 @@ void rgblight_decrease(void) { | |||
170 | } | 170 | } |
171 | 171 | ||
172 | void rgblight_step(void) { | 172 | void rgblight_step(void) { |
173 | uint8_t mode; | 173 | uint8_t mode = 0; |
174 | mode = rgblight_config.mode + 1; | 174 | mode = rgblight_config.mode + 1; |
175 | if (mode > RGBLIGHT_MODES) { | 175 | if (mode > RGBLIGHT_MODES) { |
176 | mode = 1; | 176 | mode = 1; |