aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-04-03 08:25:50 -0700
committerZach White <skullydazed@gmail.com>2021-04-03 08:27:46 -0700
commit41f649c9a95985603d1063f2ec5e2864a7e32a0b (patch)
tree33cdf8af8ca0e0f6674c976f8ea2f6aab7d8eb07 /quantum
parentd91938c19dd65af88713b9deffe95794ed78e889 (diff)
downloadqmk_firmware-41f649c9a95985603d1063f2ec5e2864a7e32a0b.tar.gz
qmk_firmware-41f649c9a95985603d1063f2ec5e2864a7e32a0b.zip
fix line endings
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix_animations/hue_breathing_anim.h44
-rw-r--r--quantum/rgb_matrix_animations/hue_pendulum_anim.h34
-rw-r--r--quantum/rgb_matrix_animations/hue_wave_anim.h34
3 files changed, 56 insertions, 56 deletions
diff --git a/quantum/rgb_matrix_animations/hue_breathing_anim.h b/quantum/rgb_matrix_animations/hue_breathing_anim.h
index 37a6293c7..54dea958a 100644
--- a/quantum/rgb_matrix_animations/hue_breathing_anim.h
+++ b/quantum/rgb_matrix_animations/hue_breathing_anim.h
@@ -1,22 +1,22 @@
1#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING 1#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING
2RGB_MATRIX_EFFECT(HUE_BREATHING) 2RGB_MATRIX_EFFECT(HUE_BREATHING)
3# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 3# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
4 4
5// Change huedelta to adjust range of hue change. 0-255. 5// Change huedelta to adjust range of hue change. 0-255.
6// Hue Breathing - All LED's light up 6// Hue Breathing - All LED's light up
7bool HUE_BREATHING(effect_params_t* params) { 7bool HUE_BREATHING(effect_params_t* params) {
8 RGB_MATRIX_USE_LIMITS(led_min, led_max); 8 RGB_MATRIX_USE_LIMITS(led_min, led_max);
9 uint8_t huedelta = 12; 9 uint8_t huedelta = 12;
10 HSV hsv = rgb_matrix_config.hsv; 10 HSV hsv = rgb_matrix_config.hsv;
11 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); 11 uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
12 hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta); 12 hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta);
13 RGB rgb = hsv_to_rgb(hsv); 13 RGB rgb = hsv_to_rgb(hsv);
14 for (uint8_t i = led_min; i < led_max; i++) { 14 for (uint8_t i = led_min; i < led_max; i++) {
15 RGB_MATRIX_TEST_LED_FLAGS(); 15 RGB_MATRIX_TEST_LED_FLAGS();
16 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); 16 rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
17 } 17 }
18 return led_max < DRIVER_LED_TOTAL; 18 return led_max < DRIVER_LED_TOTAL;
19} 19}
20 20
21# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS 21# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
22#endif // DISABLE_RGB_HUE_BREATHING 22#endif // DISABLE_RGB_HUE_BREATHING
diff --git a/quantum/rgb_matrix_animations/hue_pendulum_anim.h b/quantum/rgb_matrix_animations/hue_pendulum_anim.h
index 37db649c1..2d8d36174 100644
--- a/quantum/rgb_matrix_animations/hue_pendulum_anim.h
+++ b/quantum/rgb_matrix_animations/hue_pendulum_anim.h
@@ -1,17 +1,17 @@
1#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM 1#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM
2RGB_MATRIX_EFFECT(HUE_PENDULUM) 2RGB_MATRIX_EFFECT(HUE_PENDULUM)
3# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 3# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
4 4
5// Change huedelta to adjust range of hue change. 0-255. 5// Change huedelta to adjust range of hue change. 0-255.
6// Looks better with a low value and slow speed for subtle change. 6// Looks better with a low value and slow speed for subtle change.
7// Hue Pendulum - color changes in a wave to the right before reversing direction 7// Hue Pendulum - color changes in a wave to the right before reversing direction
8static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) { 8static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) {
9 uint8_t huedelta = 12; 9 uint8_t huedelta = 12;
10 hsv.h = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta); 10 hsv.h = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta);
11 return hsv; 11 return hsv;
12} 12}
13 13
14bool HUE_PENDULUM(effect_params_t* params) { return effect_runner_i(params, &HUE_PENDULUM_math); } 14bool HUE_PENDULUM(effect_params_t* params) { return effect_runner_i(params, &HUE_PENDULUM_math); }
15 15
16# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS 16# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
17#endif // DISABLE_RGB_HUE_PENDULUM 17#endif // DISABLE_RGB_HUE_PENDULUM
diff --git a/quantum/rgb_matrix_animations/hue_wave_anim.h b/quantum/rgb_matrix_animations/hue_wave_anim.h
index 1d4af5af4..fd9026fc9 100644
--- a/quantum/rgb_matrix_animations/hue_wave_anim.h
+++ b/quantum/rgb_matrix_animations/hue_wave_anim.h
@@ -1,17 +1,17 @@
1#ifndef DISABLE_RGB_MATRIX_HUE_WAVE 1#ifndef DISABLE_RGB_MATRIX_HUE_WAVE
2RGB_MATRIX_EFFECT(HUE_WAVE) 2RGB_MATRIX_EFFECT(HUE_WAVE)
3# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS 3# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
4 4
5// Change huedelta to adjust range of hue change. 0-255. 5// Change huedelta to adjust range of hue change. 0-255.
6// Looks better with a low value and slow speed for subtle change. 6// Looks better with a low value and slow speed for subtle change.
7// Hue Wave - color changes in a wave to the right 7// Hue Wave - color changes in a wave to the right
8static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) { 8static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) {
9 uint8_t huedelta = 24; 9 uint8_t huedelta = 24;
10 hsv.h = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta); 10 hsv.h = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta);
11 return hsv; 11 return hsv;
12} 12}
13 13
14bool HUE_WAVE(effect_params_t* params) { return effect_runner_i(params, &HUE_WAVE_math); } 14bool HUE_WAVE(effect_params_t* params) { return effect_runner_i(params, &HUE_WAVE_math); }
15 15
16# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS 16# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
17#endif // DISABLE_RGB_HUE_WAVE 17#endif // DISABLE_RGB_HUE_WAVE