瀏覽代碼

Clean up LCD width/height determination

Scott Lahteine 6 年之前
父節點
當前提交
a3923424c7
共有 2 個文件被更改,包括 17 次插入29 次删除
  1. 1
    1
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  2. 16
    28
      Marlin/src/inc/Conditionals_post.h

+ 1
- 1
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h 查看文件

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

+ 16
- 28
Marlin/src/inc/Conditionals_post.h 查看文件

@@ -1630,37 +1630,25 @@
1630 1630
 #endif
1631 1631
 
1632 1632
 // Get LCD character width/height, which may be overridden by pins, configs, etc.
1633
-#if HAS_GRAPHICAL_LCD
1634
-  #ifndef LCD_WIDTH
1635
-    #ifdef LCD_WIDTH_OVERRIDE
1636
-      #define LCD_WIDTH LCD_WIDTH_OVERRIDE
1637
-    #elif ENABLED(LIGHTWEIGHT_UI)
1638
-      #define LCD_WIDTH 16
1639
-    #else
1640
-      #define LCD_WIDTH 22
1641
-    #endif
1642
-  #endif
1643
-  #ifndef LCD_HEIGHT
1644
-    #ifdef LCD_HEIGHT_OVERRIDE
1645
-      #define LCD_HEIGHT LCD_HEIGHT_OVERRIDE
1646
-    #elif ENABLED(LIGHTWEIGHT_UI)
1647
-      #define LCD_HEIGHT 4
1648
-    #else
1649
-      #define LCD_HEIGHT 5
1650
-    #endif
1651
-  #endif
1652
-#elif ENABLED(ULTIPANEL)
1653
-  #ifndef LCD_WIDTH
1633
+#ifndef LCD_WIDTH
1634
+  #if ENABLED(LIGHTWEIGHT_UI)
1635
+    #define LCD_WIDTH 16
1636
+  #elif HAS_GRAPHICAL_LCD
1637
+    #define LCD_WIDTH 22
1638
+  #elif ENABLED(ULTIPANEL)
1654 1639
     #define LCD_WIDTH 20
1655
-  #endif
1656
-  #ifndef LCD_HEIGHT
1657
-    #define LCD_HEIGHT 4
1658
-  #endif
1659
-#elif HAS_SPI_LCD
1660
-  #ifndef LCD_WIDTH
1640
+  #elif HAS_SPI_LCD
1661 1641
     #define LCD_WIDTH 16
1662 1642
   #endif
1663
-  #ifndef LCD_HEIGHT
1643
+#endif
1644
+#ifndef LCD_HEIGHT
1645
+  #if ENABLED(LIGHTWEIGHT_UI)
1646
+    #define LCD_HEIGHT 4
1647
+  #elif HAS_GRAPHICAL_LCD
1648
+    #define LCD_HEIGHT 5
1649
+  #elif ENABLED(ULTIPANEL)
1650
+    #define LCD_HEIGHT 4
1651
+  #elif HAS_SPI_LCD
1664 1652
     #define LCD_HEIGHT 2
1665 1653
   #endif
1666 1654
 #endif

Loading…
取消
儲存