diff options
Diffstat (limited to 'keyboards/whitefox/visualizer.c')
| -rw-r--r-- | keyboards/whitefox/visualizer.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/keyboards/whitefox/visualizer.c b/keyboards/whitefox/visualizer.c index e5bafcbe9..3846e9278 100644 --- a/keyboards/whitefox/visualizer.c +++ b/keyboards/whitefox/visualizer.c | |||
| @@ -14,28 +14,22 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #ifndef KEYBOARDS_WHITEFOX_SIMPLE_VISUALIZER_H_ | ||
| 18 | #define KEYBOARDS_WHITEFOX_SIMPLE_VISUALIZER_H_ | ||
| 19 | |||
| 20 | #include "visualizer.h" | 17 | #include "visualizer.h" |
| 21 | #include "visualizer_keyframes.h" | 18 | #include "visualizer_keyframes.h" |
| 22 | #include "led.h" | ||
| 23 | #include "default_animations.h" | 19 | #include "default_animations.h" |
| 24 | 20 | ||
| 25 | |||
| 26 | static bool initial_update = true; | 21 | static bool initial_update = true; |
| 27 | 22 | ||
| 28 | // Feel free to modify the animations below, or even add new ones if needed | 23 | // Feel free to modify the animations below, or even add new ones if needed |
| 29 | 24 | ||
| 30 | void initialize_user_visualizer(visualizer_state_t* state) { | 25 | void initialize_user_visualizer(visualizer_state_t *state) { |
| 31 | // The brightness will be dynamically adjustable in the future | 26 | // The brightness will be dynamically adjustable in the future |
| 32 | // But for now, change it here. | 27 | // But for now, change it here. |
| 33 | initial_update = true; | 28 | initial_update = true; |
| 34 | start_keyframe_animation(&default_startup_animation); | 29 | start_keyframe_animation(&default_startup_animation); |
| 35 | } | 30 | } |
| 36 | 31 | ||
| 37 | 32 | void update_user_visualizer_state(visualizer_state_t *state, visualizer_keyboard_status_t *prev_status) { | |
| 38 | void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { | ||
| 39 | // Add more tests, change the colors and layer texts here | 33 | // Add more tests, change the colors and layer texts here |
| 40 | // Usually you want to check the high bits (higher layers first) | 34 | // Usually you want to check the high bits (higher layers first) |
| 41 | // because that's the order layers are processed for keypresses | 35 | // because that's the order layers are processed for keypresses |
| @@ -44,17 +38,17 @@ void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard | |||
| 44 | // state->status.default_layer | 38 | // state->status.default_layer |
| 45 | // state->status.leds (see led.h for available statuses) | 39 | // state->status.leds (see led.h for available statuses) |
| 46 | 40 | ||
| 47 | if (initial_update) { initial_update=false; start_keyframe_animation(&led_test_animation); } | 41 | if (initial_update) { |
| 42 | initial_update = false; | ||
| 43 | start_keyframe_animation(&led_test_animation); | ||
| 44 | } | ||
| 48 | } | 45 | } |
| 49 | 46 | ||
| 50 | 47 | void user_visualizer_suspend(visualizer_state_t *state) { | |
| 51 | void user_visualizer_suspend(visualizer_state_t* state) { | ||
| 52 | start_keyframe_animation(&default_suspend_animation); | 48 | start_keyframe_animation(&default_suspend_animation); |
| 53 | } | 49 | } |
| 54 | 50 | ||
| 55 | void user_visualizer_resume(visualizer_state_t* state) { | 51 | void user_visualizer_resume(visualizer_state_t *state) { |
| 56 | initial_update = true; | 52 | initial_update = true; |
| 57 | start_keyframe_animation(&default_startup_animation); | 53 | start_keyframe_animation(&default_startup_animation); |
| 58 | } | 54 | } |
| 59 | |||
| 60 | #endif /* KEYBOARDS_WHITEFOX_SIMPLE_VISUALIZER_H_ */ | ||
