summaryrefslogtreecommitdiff
path: root/quantum/visualizer/lcd_keyframes.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/visualizer/lcd_keyframes.c')
-rw-r--r--quantum/visualizer/lcd_keyframes.c42
1 files changed, 19 insertions, 23 deletions
diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c
index 75eb457001..c7d9841df3 100644
--- a/quantum/visualizer/lcd_keyframes.c
+++ b/quantum/visualizer/lcd_keyframes.c
@@ -28,8 +28,7 @@ bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer
}
static void format_layer_bitmap_string(uint16_t default_layer, uint16_t layer, char* buffer) {
- for (int i=0; i<16;i++)
- {
+ for (int i = 0; i < 16; i++) {
uint32_t mask = (1u << i);
if (default_layer & mask) {
if (layer & mask) {
@@ -44,7 +43,7 @@ static void format_layer_bitmap_string(uint16_t default_layer, uint16_t layer, c
}
++buffer;
- if (i==3 || i==7 || i==11) {
+ if (i == 3 || i == 7 || i == 11) {
*buffer = ' ';
++buffer;
}
@@ -55,7 +54,7 @@ static void format_layer_bitmap_string(uint16_t default_layer, uint16_t layer, c
bool lcd_keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
const char* layer_help = "1=On D=Default B=Both";
- char layer_buffer[16 + 4]; // 3 spaces and one null terminator
+ char layer_buffer[16 + 4]; // 3 spaces and one null terminator
gdispClear(White);
gdispDrawString(0, 0, layer_help, state->font_fixed5x8, Black);
format_layer_bitmap_string(state->status.default_layer, state->status.layer, layer_buffer);
@@ -69,8 +68,7 @@ static void format_mods_bitmap_string(uint8_t mods, char* buffer) {
*buffer = ' ';
++buffer;
- for (int i = 0; i<8; i++)
- {
+ for (int i = 0; i < 8; i++) {
uint32_t mask = (1u << i);
if (mods & mask) {
*buffer = '1';
@@ -79,7 +77,7 @@ static void format_mods_bitmap_string(uint8_t mods, char* buffer) {
}
++buffer;
- if (i==3) {
+ if (i == 3) {
*buffer = ' ';
++buffer;
}
@@ -90,9 +88,9 @@ static void format_mods_bitmap_string(uint8_t mods, char* buffer) {
bool lcd_keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
- const char* title = "Modifier states";
+ const char* title = "Modifier states";
const char* mods_header = " CSAG CSAG ";
- char status_buffer[12];
+ char status_buffer[12];
gdispClear(White);
gdispDrawString(0, 0, title, state->font_fixed5x8, Black);
@@ -109,30 +107,29 @@ static void get_led_state_string(char* output, visualizer_state_t* state) {
uint8_t pos = 0;
if (state->status.leds & (1u << USB_LED_NUM_LOCK)) {
- memcpy(output + pos, "NUM ", 4);
- pos += 4;
+ memcpy(output + pos, "NUM ", 4);
+ pos += 4;
}
if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
- memcpy(output + pos, "CAPS ", 5);
- pos += 5;
+ memcpy(output + pos, "CAPS ", 5);
+ pos += 5;
}
if (state->status.leds & (1u << USB_LED_SCROLL_LOCK)) {
- memcpy(output + pos, "SCRL ", 5);
- pos += 5;
+ memcpy(output + pos, "SCRL ", 5);
+ pos += 5;
}
if (state->status.leds & (1u << USB_LED_COMPOSE)) {
- memcpy(output + pos, "COMP ", 5);
- pos += 5;
+ memcpy(output + pos, "COMP ", 5);
+ pos += 5;
}
if (state->status.leds & (1u << USB_LED_KANA)) {
- memcpy(output + pos, "KANA", 4);
- pos += 4;
+ memcpy(output + pos, "KANA", 4);
+ pos += 4;
}
output[pos] = 0;
}
-bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state)
-{
+bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
char output[LED_STATE_STRING_SIZE];
get_led_state_string(output, state);
@@ -165,14 +162,13 @@ bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t*
// You can use static variables for things that can't be found in the animation
// or state structs, here we use the image
- //gdispGBlitArea is a tricky function to use since it supports blitting part of the image
+ // gdispGBlitArea is a tricky function to use since it supports blitting part of the image
// if you have full screen image, then just use LCD_WIDTH and LCD_HEIGHT for both source and target dimensions
gdispGBlitArea(GDISP, 0, 0, LCD_WIDTH, LCD_HEIGHT, 0, 0, LCD_WIDTH, (pixel_t*)resource_lcd_logo);
return false;
}
-
bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
(void)state;