]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - quantum/visualizer/led_keyframes.c
Merge pull request #1427 from blakedietz/master
[qmk_firmware.git] / quantum / visualizer / led_keyframes.c
index 2dacd990d147394c23b57f1932f78d98a484d820..2f4e200439af988b4276d1af504a0368a8c88f30 100644 (file)
@@ -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);
@@ -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;
+}