From b62e160a8950f451b08f1fee0109e60a58c5ddaa Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 21 Aug 2019 17:07:49 -0700 Subject: Additional changes for Layer State typedef compatibility (#5906) * Additional changes for Layer State typedef compatibility * Replace biton32 with get_highest_layer in docs * Change additional layer structure code * Fix uGFX reference issue * Remove dynamic_keymap check * Where did all these extra spaces come from Co-Authored-By: fauxpark --- quantum/visualizer/visualizer.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'quantum/visualizer/visualizer.h') diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 90ecdcbaea..56ea1fd98c 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -30,6 +30,7 @@ SOFTWARE. #include "config.h" #include "gfx.h" +#include "action_layer.h" #ifdef LCD_BACKLIGHT_ENABLE #include "lcd_backlight.h" @@ -45,7 +46,7 @@ uint8_t visualizer_get_mods(void); // This need to be called once at the start void visualizer_init(void); // This should be called at every matrix scan -void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds); +void visualizer_update(layer_state_t default_state, layer_state_t state, uint8_t mods, uint32_t leds); // This should be called when the keyboard goes to suspend state void visualizer_suspend(void); @@ -68,8 +69,8 @@ void draw_emulator(void); struct keyframe_animation_t; typedef struct { - uint32_t layer; - uint32_t default_layer; + layer_state_t layer; + layer_state_t default_layer; uint32_t leds; // See led.h for available statuses uint8_t mods; bool suspended; -- cgit v1.2.3 From b624f32f944acdc59dcb130674c09090c5c404cb Mon Sep 17 00:00:00 2001 From: skullY Date: Fri, 30 Aug 2019 11:19:03 -0700 Subject: clang-format changes --- quantum/visualizer/visualizer.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'quantum/visualizer/visualizer.h') diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 56ea1fd98c..7ca6837ce6 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -33,11 +33,11 @@ SOFTWARE. #include "action_layer.h" #ifdef LCD_BACKLIGHT_ENABLE -#include "lcd_backlight.h" +# include "lcd_backlight.h" #endif #ifdef BACKLIGHT_ENABLE -#include "backlight.h" +# include "backlight.h" #endif // use this function to merge both real_mods and oneshot_mods in a uint16_t @@ -71,9 +71,9 @@ struct keyframe_animation_t; typedef struct { layer_state_t layer; layer_state_t default_layer; - uint32_t leds; // See led.h for available statuses - uint8_t mods; - bool suspended; + uint32_t leds; // See led.h for available statuses + uint8_t mods; + bool suspended; #ifdef BACKLIGHT_ENABLE uint8_t backlight_level; #endif @@ -87,7 +87,7 @@ typedef struct { // from the user customized code typedef struct visualizer_state_t { // The user code should primarily be modifying these - uint32_t target_lcd_color; + uint32_t target_lcd_color; const char* layer_text; // The user visualizer(and animation functions) can read these @@ -111,15 +111,15 @@ typedef bool (*frame_func)(struct keyframe_animation_t*, visualizer_state_t*); // while others are meant to be initialized by the user code typedef struct keyframe_animation_t { // These should be initialized - int num_frames; - bool loop; - int frame_lengths[MAX_VISUALIZER_KEY_FRAMES]; + int num_frames; + bool loop; + int frame_lengths[MAX_VISUALIZER_KEY_FRAMES]; frame_func frame_functions[MAX_VISUALIZER_KEY_FRAMES]; // Used internally by the system, and can also be read by // keyframe update functions - int current_frame; - int time_left_in_frame; + int current_frame; + int time_left_in_frame; bool first_update_of_frame; bool last_update_of_frame; bool need_update; -- cgit v1.2.3