From b51a0db6ed03d939baad7cb9d87ed13c3653c7d2 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 3 Jun 2017 22:04:10 +0300 Subject: Add backlight support to the default Ergodox Infinity animations --- quantum/visualizer/led_keyframes.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'quantum/visualizer/led_keyframes.c') diff --git a/quantum/visualizer/led_keyframes.c b/quantum/visualizer/led_keyframes.c index 2dacd990d1..c14491e5e1 100644 --- a/quantum/visualizer/led_keyframes.c +++ b/quantum/visualizer/led_keyframes.c @@ -127,3 +127,17 @@ bool led_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_0); return false; } + +bool led_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { + (void)state; + (void)animation; + gdispGSetPowerMode(LED_DISPLAY, powerOff); + return false; +} + +bool led_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { + (void)state; + (void)animation; + gdispGSetPowerMode(LED_DISPLAY, powerOn); + return false; +} -- cgit v1.2.3 From 1e6a3f9e170759dd88ba29f67d35d9c34b3f8f8c Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 25 Jun 2017 12:55:18 +0300 Subject: Change M_2_PI to 2 * PI as it should be --- quantum/visualizer/led_keyframes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/visualizer/led_keyframes.c') diff --git a/quantum/visualizer/led_keyframes.c b/quantum/visualizer/led_keyframes.c index c14491e5e1..2f4e200439 100644 --- a/quantum/visualizer/led_keyframes.c +++ b/quantum/visualizer/led_keyframes.c @@ -48,7 +48,7 @@ static uint8_t crossfade_start_frame[NUM_ROWS][NUM_COLS]; static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS]; static uint8_t compute_gradient_color(float t, float index, float num) { - const float two_pi = M_2_PI; + const float two_pi = M_PI * 2.0f; float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; float x = t * two_pi + normalized_index; float v = 0.5 * (cosf(x) + 1.0f); -- cgit v1.2.3 From 42e6ecc36b65ad0f0d29c6c35c93b95078c11a1a Mon Sep 17 00:00:00 2001 From: Ethan Madden Date: Sun, 25 Jun 2017 18:30:40 -0700 Subject: Whitefox LED control (#1432) * use new grave_esc functionality * Port LED control from Ergodox Infinity to Whitefox --- quantum/visualizer/led_keyframes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/visualizer/led_keyframes.c') diff --git a/quantum/visualizer/led_keyframes.c b/quantum/visualizer/led_keyframes.c index 2f4e200439..7e6e5d1ab9 100644 --- a/quantum/visualizer/led_keyframes.c +++ b/quantum/visualizer/led_keyframes.c @@ -41,8 +41,8 @@ static void keyframe_fade_all_leds_from_to(keyframe_animation_t* animation, uint } // TODO: Should be customizable per keyboard -#define NUM_ROWS 7 -#define NUM_COLS 7 +#define NUM_ROWS LED_NUM_ROWS +#define NUM_COLS LED_NUM_COLS static uint8_t crossfade_start_frame[NUM_ROWS][NUM_COLS]; static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS]; -- cgit v1.2.3