Refactor LCD menus

This commit is contained in:
Scott Lahteine
2018-10-23 16:00:34 -05:00
parent ac5f2762b7
commit 2bf18950ab
25 changed files with 5720 additions and 5442 deletions

View File

@ -298,7 +298,13 @@
#define ULTIPANEL
#endif
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
#if ENABLED(NO_LCD_MENUS)
#undef ULTIPANEL
#endif
#define HAS_GRAPHICAL_LCD ENABLED(DOGLCD)
#if HAS_GRAPHICAL_LCD
#ifndef LCD_WIDTH
#ifdef LCD_WIDTH_OVERRIDE
#define LCD_WIDTH LCD_WIDTH_OVERRIDE
@ -311,10 +317,6 @@
#endif
#endif
#if ENABLED(NO_LCD_MENUS)
#undef ULTIPANEL
#endif
#if ENABLED(ULTIPANEL)
#define NEWPANEL // Disable this if you actually have no click-encoder panel
#define ULTRA_LCD
@ -333,7 +335,14 @@
#endif
#endif
#if ENABLED(DOGLCD)
// Aliases for LCD features
#define HAS_SPI_LCD ENABLED(ULTRA_LCD)
#define HAS_CHARACTER_LCD (ENABLED(ULTRA_LCD) && DISABLED(DOGLCD))
#define HAS_DIGITAL_ENCODER (HAS_SPI_LCD && ENABLED(NEWPANEL))
#define HAS_LCD_MENU ENABLED(ULTIPANEL)
#define HAS_DEBUG_MENU (HAS_LCD_MENU && ENABLED(LCD_PROGRESS_BAR_TEST))
#if HAS_GRAPHICAL_LCD
/* Custom characters defined in font Marlin_symbols.fon which was merged to ISO10646-0-3.bdf */
// \x00 intentionally skipped to avoid problems in strings
#define LCD_STR_REFRESH "\x01"
@ -369,7 +378,7 @@
/**
* Default LCD contrast for dogm-like LCD displays
*/
#if ENABLED(DOGLCD)
#if HAS_GRAPHICAL_LCD
#define HAS_LCD_CONTRAST ( \
ENABLED(MAKRPANEL) \
@ -394,14 +403,12 @@
#endif
// Boot screens
#if DISABLED(ULTRA_LCD)
#if !HAS_SPI_LCD
#undef SHOW_BOOTSCREEN
#elif !defined(BOOTSCREEN_TIMEOUT)
#define BOOTSCREEN_TIMEOUT 2500
#endif
#define HAS_DEBUG_MENU (ENABLED(ULTIPANEL) && ENABLED(LCD_PROGRESS_BAR_TEST))
/**
* Extruders have some combination of stepper motors and hotends
* so we separate these concepts into the defines: