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

@@ -323,15 +323,15 @@ static PGM_P advanced_pause_header() {
// Portions from STATIC_ITEM...
#define HOTEND_STATUS_ITEM() do { \
if (_menuLineNr == _thisItemNr) { \
if (lcdDrawUpdate) { \
lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(MSG_FILAMENT_CHANGE_NOZZLE), false, true); \
lcd_implementation_hotend_status(_lcdLineNr, hotend_status_extruder); \
if (ui.should_draw()) { \
draw_menu_item_static(_lcdLineNr, PSTR(MSG_FILAMENT_CHANGE_NOZZLE), false, true); \
ui.draw_hotend_status(_lcdLineNr, hotend_status_extruder); \
} \
if (_skipStatic && encoderLine <= _thisItemNr) { \
encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
ui.encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
++encoderLine; \
} \
lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \
ui.refresh(LCDVIEW_CALL_REDRAW_NEXT); \
} \
++_thisItemNr; \
}while(0)
@@ -507,11 +507,11 @@ void lcd_advanced_pause_show_message(
hotend_status_extruder = extruder;
const screenFunc_t next_screen = ap_message_screen(message);
if (next_screen) {
set_defer_return_to_status(true);
lcd_goto_screen(next_screen);
ui.defer_status_screen(true);
ui.goto_screen(next_screen);
}
else
lcd_return_to_status();
ui.return_to_status();
}
#endif // HAS_LCD_MENU && ADVANCED_PAUSE_FEATURE