Browse Source

Clean up LCD width/height determination

pull/1/head
Scott Lahteine 6 years ago
parent
commit
a3923424c7
  1. 2
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  2. 28
      Marlin/src/inc/Conditionals_post.h

2
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h

@ -2036,7 +2036,7 @@
#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864) #if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864)
#define SDSUPPORT // Force SD Card support on for these displays #define SDSUPPORT // Force SD Card support on for these displays
#elif DISABLED(LIGHTWEIGHT_UI) #elif DISABLED(LIGHTWEIGHT_UI)
#define LCD_WIDTH_OVERRIDE 20 // Default is 22. For this Geeetech use 20. #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20.
#endif #endif
// Allow servo angle to be edited and saved to EEPROM // Allow servo angle to be edited and saved to EEPROM

28
Marlin/src/inc/Conditionals_post.h

@ -1630,37 +1630,25 @@
#endif #endif
// Get LCD character width/height, which may be overridden by pins, configs, etc. // Get LCD character width/height, which may be overridden by pins, configs, etc.
#if HAS_GRAPHICAL_LCD
#ifndef LCD_WIDTH #ifndef LCD_WIDTH
#ifdef LCD_WIDTH_OVERRIDE #if ENABLED(LIGHTWEIGHT_UI)
#define LCD_WIDTH LCD_WIDTH_OVERRIDE
#elif ENABLED(LIGHTWEIGHT_UI)
#define LCD_WIDTH 16 #define LCD_WIDTH 16
#else #elif HAS_GRAPHICAL_LCD
#define LCD_WIDTH 22 #define LCD_WIDTH 22
#elif ENABLED(ULTIPANEL)
#define LCD_WIDTH 20
#elif HAS_SPI_LCD
#define LCD_WIDTH 16
#endif #endif
#endif #endif
#ifndef LCD_HEIGHT #ifndef LCD_HEIGHT
#ifdef LCD_HEIGHT_OVERRIDE #if ENABLED(LIGHTWEIGHT_UI)
#define LCD_HEIGHT LCD_HEIGHT_OVERRIDE
#elif ENABLED(LIGHTWEIGHT_UI)
#define LCD_HEIGHT 4 #define LCD_HEIGHT 4
#else #elif HAS_GRAPHICAL_LCD
#define LCD_HEIGHT 5 #define LCD_HEIGHT 5
#endif
#endif
#elif ENABLED(ULTIPANEL) #elif ENABLED(ULTIPANEL)
#ifndef LCD_WIDTH
#define LCD_WIDTH 20
#endif
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 4 #define LCD_HEIGHT 4
#endif
#elif HAS_SPI_LCD #elif HAS_SPI_LCD
#ifndef LCD_WIDTH
#define LCD_WIDTH 16
#endif
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 2 #define LCD_HEIGHT 2
#endif #endif
#endif #endif

Loading…
Cancel
Save