From a3db72df7299140e52f57d082a3742a8b480a226 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 29 Aug 2020 22:57:48 +0000 Subject: format code according to conventions [skip ci] --- quantum/rgblight.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'quantum/rgblight.c') 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); -- cgit v1.2.3