Browse Source

Apply #elif in LCD conditionals

Scott Lahteine 8 years ago
parent
commit
6c45fa7dcc
1 changed files with 42 additions and 37 deletions
  1. 42
    37
      Marlin/Conditionals_LCD.h

+ 42
- 37
Marlin/Conditionals_LCD.h View File

31
   #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
31
   #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
32
 
32
 
33
   #if ENABLED(CARTESIO_UI)
33
   #if ENABLED(CARTESIO_UI)
34
+
34
     #define DOGLCD
35
     #define DOGLCD
35
     #define ULTIPANEL
36
     #define ULTIPANEL
36
     #define NEWPANEL
37
     #define NEWPANEL
37
     #define DEFAULT_LCD_CONTRAST 90
38
     #define DEFAULT_LCD_CONTRAST 90
38
     #define LCD_CONTRAST_MIN 60
39
     #define LCD_CONTRAST_MIN 60
39
     #define LCD_CONTRAST_MAX 140
40
     #define LCD_CONTRAST_MAX 140
40
-  #endif
41
 
41
 
42
-  #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
42
+  #elif ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
43
+
43
     #define DOGLCD
44
     #define DOGLCD
44
     #define ULTIPANEL
45
     #define ULTIPANEL
45
     #define NEWPANEL
46
     #define NEWPANEL
46
     #define DEFAULT_LCD_CONTRAST 17
47
     #define DEFAULT_LCD_CONTRAST 17
47
-  #endif
48
 
48
 
49
-  #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
49
+  #elif ENABLED(BQ_LCD_SMART_CONTROLLER)
50
+
51
+    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
52
+    #define LONG_FILENAME_HOST_SUPPORT
53
+
54
+  #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
55
+
50
     #define ULTRA_LCD  //general LCD support, also 16x2
56
     #define ULTRA_LCD  //general LCD support, also 16x2
51
     #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
57
     #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
52
     #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
58
     #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
65
       #define SD_DETECT_INVERTED
71
       #define SD_DETECT_INVERTED
66
     #endif
72
     #endif
67
 
73
 
68
-  #endif
74
+  #elif ENABLED(OLED_PANEL_TINYBOY2)
69
 
75
 
70
-  #if ENABLED(OLED_PANEL_TINYBOY2)
71
     #define U8GLIB_SSD1306
76
     #define U8GLIB_SSD1306
72
     #define ULTIPANEL
77
     #define ULTIPANEL
73
     #define NEWPANEL
78
     #define NEWPANEL
74
     #define REVERSE_ENCODER_DIRECTION
79
     #define REVERSE_ENCODER_DIRECTION
75
     #define REVERSE_MENU_DIRECTION
80
     #define REVERSE_MENU_DIRECTION
81
+
82
+  #elif ENABLED(RA_CONTROL_PANEL)
83
+
84
+    #define LCD_I2C_TYPE_PCA8574
85
+    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
86
+    #define ULTIPANEL
87
+    #define NEWPANEL
88
+
89
+  #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
90
+
91
+    #define DOGLCD
92
+    #define U8GLIB_ST7920
93
+    #define ULTIPANEL
94
+    #define NEWPANEL
95
+
76
   #endif
96
   #endif
77
 
97
 
78
   // Generic support for SSD1306 / SH1106 OLED based LCDs.
98
   // Generic support for SSD1306 / SH1106 OLED based LCDs.
85
     #define ULTIMAKERCONTROLLER
105
     #define ULTIMAKERCONTROLLER
86
   #endif
106
   #endif
87
 
107
 
88
-  #if ENABLED(BQ_LCD_SMART_CONTROLLER)
89
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
90
-    #ifndef LONG_FILENAME_HOST_SUPPORT
91
-      #define LONG_FILENAME_HOST_SUPPORT
92
-    #endif
93
-  #endif
94
-
95
   #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
108
   #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
96
     #define DOGLCD
109
     #define DOGLCD
97
     #define U8GLIB_ST7920
110
     #define U8GLIB_ST7920
113
     #endif
126
     #endif
114
   #endif
127
   #endif
115
 
128
 
116
-  #if ENABLED(RA_CONTROL_PANEL)
117
-    #define LCD_I2C_TYPE_PCA8574
118
-    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
119
-    #define ULTIPANEL
120
-    #define NEWPANEL
121
-  #endif
122
-
123
-  #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
124
-    #define DOGLCD
125
-    #define U8GLIB_ST7920
126
-    #define ULTIPANEL
127
-    #define NEWPANEL
128
-  #endif
129
-
130
   /**
129
   /**
131
    * I2C PANELS
130
    * I2C PANELS
132
    */
131
    */
133
 
132
 
134
   #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
133
   #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
134
+
135
     // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
135
     // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
136
     // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
136
     // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
137
+
137
     #define LCD_I2C_TYPE_PCF8575
138
     #define LCD_I2C_TYPE_PCF8575
138
     #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
139
     #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
139
     #define ULTIPANEL
140
     #define ULTIPANEL
140
     #define NEWPANEL
141
     #define NEWPANEL
141
-  #endif
142
 
142
 
143
-  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
144
-  #if ENABLED(LCD_I2C_PANELOLU2)
143
+  #elif ENABLED(LCD_I2C_PANELOLU2)
144
+
145
+    // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
146
+
145
     #define LCD_I2C_TYPE_MCP23017
147
     #define LCD_I2C_TYPE_MCP23017
146
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
148
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
147
     #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
149
     #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
148
     #define ULTIPANEL
150
     #define ULTIPANEL
149
     #define NEWPANEL
151
     #define NEWPANEL
150
-  #endif
151
 
152
 
152
-  // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
153
-  #if ENABLED(LCD_I2C_VIKI)
154
-    // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
155
-    // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
156
-    // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
157
-    //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
153
+  #elif ENABLED(LCD_I2C_VIKI)
154
+
155
+    /**
156
+     * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
157
+     *
158
+     * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
159
+     * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
160
+     * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
161
+     *       BTN_ENC pin (or set BTN_ENC to -1 if not used)
162
+     */
158
     #define LCD_I2C_TYPE_MCP23017
163
     #define LCD_I2C_TYPE_MCP23017
159
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
164
     #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
160
     #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
165
     #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)

Loading…
Cancel
Save