Skip to content

Commit

Permalink
Add automatic flush for the LCD screen
Browse files Browse the repository at this point in the history
  • Loading branch information
fredizzimo committed Apr 9, 2017
1 parent 995002f commit 3eb8785
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
srcbit++;
}
}
g->flags |= GDISP_FLG_NEEDFLUSH;
}

#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
Expand Down
2 changes: 0 additions & 2 deletions keyboards/ergodox/infinity/visualizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ bool display_logo(keyframe_animation_t* animation, visualizer_state_t* state) {
// if you have full screen image, then just use 128 and 32 for both source and target dimensions
gdispGBlitArea(GDISP, 0, 0, 128, 32, 0, 0, 128, (pixel_t*)image_data_lcd_logo);

// Always remember to flush the display
gdispFlush();
return false;
}

Expand Down
2 changes: 0 additions & 2 deletions keyboards/ergodox/keymaps/default/visualizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ bool display_logo(keyframe_animation_t* animation, visualizer_state_t* state) {
// if you have full screen image, then just use 128 and 32 for both source and target dimensions
gdispGBlitArea(GDISP, 0, 0, 128, 32, 0, 0, 128, (pixel_t*)image_data_lcd_logo);

// Always remember to flush the display
gdispFlush();
return false;
}

Expand Down
5 changes: 0 additions & 5 deletions quantum/visualizer/lcd_keyframes.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer
(void)animation;
gdispClear(White);
gdispDrawString(0, 10, state->layer_text, state->font_dejavusansbold12, Black);
gdispFlush();
return false;
}

Expand Down Expand Up @@ -62,7 +61,6 @@ bool lcd_keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualiz
gdispDrawString(0, 10, layer_buffer, state->font_fixed5x8, Black);
format_layer_bitmap_string(state->status.default_layer >> 16, state->status.layer >> 16, layer_buffer);
gdispDrawString(0, 20, layer_buffer, state->font_fixed5x8, Black);
gdispFlush();
return false;
}

Expand Down Expand Up @@ -101,7 +99,6 @@ bool lcd_keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualize
format_mods_bitmap_string(state->status.mods, status_buffer);
gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black);

gdispFlush();
return false;
}

Expand Down Expand Up @@ -140,7 +137,6 @@ bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer
get_led_state_string(output, state);
gdispClear(White);
gdispDrawString(0, 10, output, state->font_dejavusansbold12, Black);
gdispFlush();
return false;
}

Expand All @@ -155,7 +151,6 @@ bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation,
y = 17;
}
gdispDrawString(0, y, state->layer_text, state->font_dejavusansbold12, Black);
gdispFlush();
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions quantum/visualizer/visualizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
gdispGFlush(LED_DISPLAY);
#endif

#ifdef LCD_ENABLE
gdispGFlush(LCD_DISPLAY);
#endif

#ifdef EMULATOR
draw_emulator();
#endif
Expand Down

0 comments on commit 3eb8785

Please sign in to comment.