Encapsulate common display code in a singleton (#12395)

* Encapsulate common LCD code in a singleton
* Depend more UBL code on UBL_DEVEL_DEBUGGING
  - Since most users don't need the debugging on at all times, this helps reduce the default build size for UBL by over 2K, a little closer to fitting on 128K boards.
This commit is contained in:
Scott Lahteine
2018-11-11 12:16:24 -06:00
committed by GitHub
parent 9da6809ac3
commit a0c795b097
65 changed files with 1881 additions and 1997 deletions

View File

@ -371,7 +371,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
if (ubl.lcd_map_control) {
ubl.lcd_map_control = false;
set_defer_return_to_status(false);
ui.defer_status_screen(false);
}
#endif
}
@ -549,7 +549,7 @@ void idle(
max7219.idle_tasks();
#endif
lcd_update();
ui.update();
#if ENABLED(HOST_KEEPALIVE_FEATURE)
gcode.host_keepalive();
@ -609,8 +609,8 @@ void kill(PGM_P const lcd_msg/*=NULL*/) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
#if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI)
kill_screen(lcd_msg ? lcd_msg : PSTR(MSG_KILLED));
#if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI)
ui.kill_screen(lcd_msg ? lcd_msg : PSTR(MSG_KILLED));
#else
UNUSED(lcd_msg);
#endif
@ -899,11 +899,11 @@ void setup() {
fanmux_init();
#endif
lcd_init();
lcd_reset_status();
ui.init();
ui.reset_status();
#if ENABLED(SHOW_BOOTSCREEN)
lcd_bootscreen();
ui.show_bootscreen();
#endif
#if ENABLED(MIXING_EXTRUDER)