Fix up LCD init / charset
This commit is contained in:
parent
e2568d7589
commit
73ddc762c8
3 changed files with 113 additions and 93 deletions
|
|
@ -521,13 +521,15 @@ uint16_t max_display_update_time = 0;
|
|||
lcd_implementation_clear();
|
||||
// Re-initialize custom characters that may be re-used
|
||||
#if DISABLED(DOGLCD) && ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
if (!ubl_lcd_map_control) lcd_set_custom_characters(
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
screen == lcd_status_screen
|
||||
#endif
|
||||
);
|
||||
if (!ubl_lcd_map_control) {
|
||||
lcd_set_custom_characters(
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
screen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU
|
||||
#endif
|
||||
);
|
||||
}
|
||||
#elif ENABLED(LCD_PROGRESS_BAR)
|
||||
lcd_set_custom_characters(screen == lcd_status_screen);
|
||||
lcd_set_custom_characters(screen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU);
|
||||
#endif
|
||||
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
|
||||
screen_changed = true;
|
||||
|
|
@ -669,7 +671,7 @@ void lcd_status_screen() {
|
|||
#endif
|
||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
false
|
||||
CHARSET_MENU
|
||||
#endif
|
||||
);
|
||||
lcd_goto_screen(lcd_main_menu);
|
||||
|
|
@ -850,7 +852,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
static int8_t bar_percent = 0;
|
||||
if (lcd_clicked) {
|
||||
lcd_goto_previous_menu();
|
||||
lcd_set_custom_characters(false);
|
||||
lcd_set_custom_characters(CHARSET_MENU);
|
||||
return;
|
||||
}
|
||||
bar_percent += (int8_t)encoderPosition;
|
||||
|
|
@ -4469,11 +4471,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
|
||||
void lcd_init() {
|
||||
|
||||
lcd_implementation_init(
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
true
|
||||
#endif
|
||||
);
|
||||
lcd_implementation_init();
|
||||
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if BUTTON_EXISTS(EN1)
|
||||
|
|
@ -4642,7 +4640,7 @@ void lcd_update() {
|
|||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
currentScreen == lcd_status_screen
|
||||
currentScreen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue