summaryrefslogtreecommitdiff
path: root/quantum/rgblight.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgblight.c')
-rw-r--r--quantum/rgblight.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 52d8da1813..211ec975a6 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -407,7 +407,6 @@ void rgblight_decrease_val_helper(bool write_to_eeprom) {
void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); }
void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); }
-
void rgblight_increase_speed_helper(bool write_to_eeprom) {
if (rgblight_config.speed < 3) rgblight_config.speed++;
// RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?
@@ -428,7 +427,6 @@ void rgblight_decrease_speed_helper(bool write_to_eeprom) {
void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); }
void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); }
-
void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
if (rgblight_config.enable) {
LED_TYPE tmp_led;
@@ -1170,17 +1168,17 @@ void rgblight_effect_knight(animation_status_t *anim) {
*/
void rgblight_effect_christmas(animation_status_t *anim) {
static int8_t increment = 1;
- const uint8_t max_pos = 32;
+ const uint8_t max_pos = 32;
const uint8_t hue_green = 85;
uint32_t xa;
- uint8_t hue, val;
- uint8_t i;
+ uint8_t hue, val;
+ uint8_t i;
// The effect works by animating anim->pos from 0 to 32 and back to 0.
// The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible.
- xa = CUBED((uint32_t) anim->pos);
- hue = ((uint32_t) hue_green) * xa / (xa + CUBED((uint32_t) (max_pos - anim->pos)));
+ xa = CUBED((uint32_t)anim->pos);
+ hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos)));
// Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors.
val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2);