Parcourir la source

Clean up some LCD conditions

Scott Lahteine il y a 5 ans
Parent
révision
948c3f580b

+ 1
- 4
Marlin/src/inc/Conditionals_LCD.h Voir le fichier

@@ -229,17 +229,14 @@
229 229
 
230 230
  // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
231 231
  #if ENABLED(U8GLIB_SH1106_EINSTART)
232
-   #define ULTRA_LCD
233 232
    #define DOGLCD
234 233
    #define ULTIPANEL
235
-   #define NEWPANEL
236 234
  #endif
237 235
 
238 236
  /**
239 237
   * FSMC/SPI TFT PANELS
240 238
   */
241 239
  #if ENABLED(MKS_ROBIN_TFT)
242
-   #define ULTRA_LCD
243 240
    #define DOGLCD
244 241
    #define ULTIPANEL
245 242
  #endif
@@ -330,7 +327,7 @@
330 327
 #endif
331 328
 
332 329
 #if ENABLED(ULTIPANEL)
333
-  #define NEWPANEL  // Disable this if you actually have no click-encoder panel
330
+  #define NEWPANEL        // Disable if there's actually no click-encoder panel
334 331
   #define ULTRA_LCD
335 332
 #endif
336 333
 

+ 4
- 4
Marlin/src/pins/linux/pins_RAMPS_LINUX.h Voir le fichier

@@ -221,9 +221,9 @@
221 221
 #endif
222 222
 
223 223
 #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
224
-  #if NUM_SERVOS <= 1 // try to use servo connector first
224
+  #if NUM_SERVOS <= 1 // Prefer the servo connector
225 225
     #define CASE_LIGHT_PIN    6   // Hardware PWM
226
-  #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))  // try to use AUX 2
226
+  #elif HAS_FREE_AUX2_PINS        // try to use AUX 2
227 227
     #define CASE_LIGHT_PIN   44   // Hardware PWM
228 228
   #endif
229 229
 #endif
@@ -232,11 +232,11 @@
232 232
 // M3/M4/M5 - Spindle/Laser Control
233 233
 //
234 234
 #if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
235
-  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
235
+  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // Prefer the servo connector
236 236
     #define SPINDLE_LASER_ENA_PIN     4   // Pullup or pulldown!
237 237
     #define SPINDLE_LASER_PWM_PIN     6   // Hardware PWM
238 238
     #define SPINDLE_DIR_PIN           5
239
-  #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))  // try to use AUX 2
239
+  #elif HAS_FREE_AUX2_PINS                // try to use AUX 2
240 240
     #define SPINDLE_LASER_ENA_PIN    40   // Pullup or pulldown!
241 241
     #define SPINDLE_LASER_PWM_PIN    44   // Hardware PWM
242 242
     #define SPINDLE_DIR_PIN          65

+ 4
- 0
Marlin/src/pins/pins.h Voir le fichier

@@ -47,6 +47,8 @@
47 47
   #define IS_RAMPS_SF
48 48
 #endif
49 49
 
50
+#define HAS_FREE_AUX2_PINS !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
51
+
50 52
 //
51 53
 // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
52 54
 //
@@ -1079,3 +1081,5 @@
1079 1081
     #endif
1080 1082
   #endif
1081 1083
 #endif
1084
+
1085
+#undef HAS_FREE_AUX2_PINS

+ 3
- 7
Marlin/src/pins/ramps/pins_RAMPS.h Voir le fichier

@@ -258,12 +258,10 @@
258 258
   #define PS_ON_PIN        12
259 259
 #endif
260 260
 
261
-#define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) )
262
-
263 261
 #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
264
-  #if NUM_SERVOS <= 1 // try to use servo connector first
262
+  #if NUM_SERVOS <= 1 // Prefer the servo connector
265 263
     #define CASE_LIGHT_PIN  6   // Hardware PWM
266
-  #elif AUX2_PINS_FREE
264
+  #elif HAS_FREE_AUX2_PINS
267 265
     #define CASE_LIGHT_PIN 44   // Hardware PWM
268 266
   #endif
269 267
 #endif
@@ -276,7 +274,7 @@
276 274
     #define SPINDLE_LASER_ENA_PIN     4   // Pullup or pulldown!
277 275
     #define SPINDLE_LASER_PWM_PIN     6   // Hardware PWM
278 276
     #define SPINDLE_DIR_PIN           5
279
-  #elif AUX2_PINS_FREE
277
+  #elif HAS_FREE_AUX2_PINS
280 278
     #define SPINDLE_LASER_ENA_PIN    40   // Pullup or pulldown!
281 279
     #define SPINDLE_LASER_PWM_PIN    44   // Hardware PWM
282 280
     #define SPINDLE_DIR_PIN          65
@@ -285,8 +283,6 @@
285 283
   #endif
286 284
 #endif
287 285
 
288
-#undef AUX2_PINS_FREE
289
-
290 286
 //
291 287
 // TMC software SPI
292 288
 //

+ 4
- 8
Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h Voir le fichier

@@ -157,12 +157,10 @@
157 157
   #define PS_ON_PIN        12
158 158
 #endif
159 159
 
160
-#define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) )
161
-
162 160
 #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
163
-  #if NUM_SERVOS <= 1 // try to use servo connector first
161
+  #if NUM_SERVOS <= 1 // Prefer the servo connector
164 162
     #define CASE_LIGHT_PIN    6   // Hardware PWM
165
-  #elif AUX2_PINS_FREE
163
+  #elif HAS_FREE_AUX2_PINS
166 164
     #define CASE_LIGHT_PIN   44   // Hardware PWM
167 165
   #endif
168 166
 #endif
@@ -171,19 +169,17 @@
171 169
 // M3/M4/M5 - Spindle/Laser Control
172 170
 //
173 171
 #if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
174
-  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
172
+  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // Prefer the servo connector
175 173
     #define SPINDLE_LASER_ENA_PIN     4   // Pullup or pulldown!
176 174
     #define SPINDLE_LASER_PWM_PIN     6   // Hardware PWM
177 175
     #define SPINDLE_DIR_PIN           5
178
-  #elif AUX2_PINS_FREE
176
+  #elif HAS_FREE_AUX2_PINS
179 177
     #define SPINDLE_LASER_ENA_PIN    40   // Pullup or pulldown!
180 178
     #define SPINDLE_LASER_PWM_PIN    44   // Hardware PWM
181 179
     #define SPINDLE_DIR_PIN          65
182 180
   #endif
183 181
 #endif
184 182
 
185
-#undef AUX2_PINS_FREE
186
-
187 183
 //
188 184
 // TMC software SPI
189 185
 //

Chargement…
Annuler
Enregistrer