Subversion Repositories MK-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ron 1
/**
2
 * Marlin 3D Printer Firmware
3
 * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
 *
5
 * Based on Sprinter and grbl.
6
 * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 *
21
 */
22
 
23
/**
24
 * Conditionals_LCD.h
25
 * Conditionals that need to be set before Configuration_adv.h or pins.h
26
 */
27
 
28
#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
29
#define CONDITIONALS_LCD_H
30
 
31
#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
32
 
33
#if ENABLED(CARTESIO_UI)
34
 
35
  #define DOGLCD
36
  #define ULTIPANEL
37
  #define DEFAULT_LCD_CONTRAST 90
38
  #define LCD_CONTRAST_MIN 60
39
  #define LCD_CONTRAST_MAX 140
40
 
41
#elif ENABLED(MAKRPANEL)
42
 
43
  #define U8GLIB_ST7565_64128N
44
 
45
#elif ENABLED(ZONESTAR_LCD)
46
 
47
  #define REPRAPWORLD_KEYPAD
48
  #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
49
  #define ADC_KEYPAD
50
  #define ADC_KEY_NUM 8
51
  #define ULTIPANEL
52
 
53
  // this helps to implement ADC_KEYPAD menus
54
  #define ENCODER_PULSES_PER_STEP 1
55
  #define ENCODER_STEPS_PER_MENU_ITEM 1
56
  #define ENCODER_FEEDRATE_DEADZONE 2
57
  #define REVERSE_MENU_DIRECTION
58
 
59
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
60
 
61
  #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
62
 
63
#elif ENABLED(BQ_LCD_SMART_CONTROLLER)
64
 
65
  #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
66
 
67
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
68
 
69
  #define ULTRA_LCD  //general LCD support, also 16x2
70
  #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
71
  #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
72
 
73
  #if ENABLED(miniVIKI)
74
    #define LCD_CONTRAST_MIN      75
75
    #define LCD_CONTRAST_MAX     115
76
    #define DEFAULT_LCD_CONTRAST  95
77
    #define U8GLIB_ST7565_64128N
78
  #elif ENABLED(VIKI2)
79
    #define LCD_CONTRAST_MIN       0
80
    #define LCD_CONTRAST_MAX     255
81
    #define DEFAULT_LCD_CONTRAST 140
82
    #define U8GLIB_ST7565_64128N
83
  #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
84
    #define LCD_CONTRAST_MIN      90
85
    #define LCD_CONTRAST_MAX     130
86
    #define DEFAULT_LCD_CONTRAST 110
87
    #define U8GLIB_LM6059_AF
88
    #define SD_DETECT_INVERTED
89
  #endif
90
 
91
#elif ENABLED(OLED_PANEL_TINYBOY2)
92
 
93
  #define U8GLIB_SSD1306
94
  #define ULTIPANEL
95
  #define REVERSE_ENCODER_DIRECTION
96
  #define REVERSE_MENU_DIRECTION
97
 
98
#elif ENABLED(RA_CONTROL_PANEL)
99
 
100
  #define LCD_I2C_TYPE_PCA8574
101
  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
102
  #define ULTIPANEL
103
 
104
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
105
 
106
  #define DOGLCD
107
  #define U8GLIB_ST7920
108
  #define ULTIPANEL
109
 
110
#elif ENABLED(CR10_STOCKDISPLAY)
111
 
112
  #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
113
  #ifndef ST7920_DELAY_1
114
    #define ST7920_DELAY_1 DELAY_NS(125)
115
  #endif
116
  #ifndef ST7920_DELAY_2
117
    #define ST7920_DELAY_2 DELAY_NS(125)
118
  #endif
119
  #ifndef ST7920_DELAY_3
120
    #define ST7920_DELAY_3 DELAY_NS(125)
121
  #endif
122
 
123
#elif ENABLED(MKS_12864OLED)
124
 
125
  #define REPRAP_DISCOUNT_SMART_CONTROLLER
126
  #define U8GLIB_SH1106
127
 
128
#elif ENABLED(MKS_12864OLED_SSD1306)
129
 
130
  #define REPRAP_DISCOUNT_SMART_CONTROLLER
131
  #define U8GLIB_SSD1306
132
 
133
#elif ENABLED(MKS_MINI_12864)
134
 
135
  #define MINIPANEL
136
 
137
#endif
138
 
139
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
140
  #define DOGLCD
141
  #define ULTIPANEL
142
  #define DEFAULT_LCD_CONTRAST 17
143
#endif
144
 
145
#if ENABLED(ULTI_CONTROLLER)
146
  #define U8GLIB_SSD1309
147
  #define REVERSE_ENCODER_DIRECTION
148
  #define LCD_RESET_PIN LCD_PINS_D6 //  This controller need a reset pin
149
  #define LCD_CONTRAST_MIN 0
150
  #define LCD_CONTRAST_MAX 254
151
  #define DEFAULT_LCD_CONTRAST 127
152
  #define ENCODER_PULSES_PER_STEP 2
153
  #define ENCODER_STEPS_PER_MENU_ITEM 2
154
#endif
155
 
156
// Generic support for SSD1306 / SSD1309 / SH1106 OLED based LCDs.
157
#if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SSD1309) || ENABLED(U8GLIB_SH1106)
158
  #define ULTRA_LCD  //general LCD support, also 16x2
159
  #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 / SSD1309 / SH1106 graphic Display Family)
160
#endif
161
 
162
#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
163
 
164
  #define ULTIMAKERCONTROLLER
165
 
166
#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
167
 
168
  #define REPRAP_DISCOUNT_SMART_CONTROLLER
169
  #define LCD_WIDTH 16
170
  #define LCD_HEIGHT 2
171
 
172
#endif
173
 
174
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
175
  #define DOGLCD
176
  #define U8GLIB_ST7920
177
  #define REPRAP_DISCOUNT_SMART_CONTROLLER
178
#endif
179
 
180
#if ENABLED(ULTIMAKERCONTROLLER)              \
181
 || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
182
 || ENABLED(G3D_PANEL)                        \
183
 || ENABLED(RIGIDBOT_PANEL)                   \
184
 || ENABLED(ULTI_CONTROLLER)
185
  #define ULTIPANEL
186
#endif
187
 
188
#if ENABLED(REPRAPWORLD_KEYPAD)
189
  #define NEWPANEL
190
  #if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
191
    #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
192
  #endif
193
#endif
194
 
195
/**
196
 * I2C PANELS
197
 */
198
 
199
#if ENABLED(LCD_SAINSMART_I2C_1602) || ENABLED(LCD_SAINSMART_I2C_2004)
200
 
201
  #define LCD_I2C_TYPE_PCF8575
202
  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
203
  #define ULTRA_LCD
204
 
205
  #if ENABLED(LCD_SAINSMART_I2C_2004)
206
    #define LCD_WIDTH 20
207
    #define LCD_HEIGHT 4
208
  #endif
209
 
210
#elif ENABLED(LCD_I2C_PANELOLU2)
211
 
212
  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
213
 
214
  #define LCD_I2C_TYPE_MCP23017
215
  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
216
  #define LCD_USE_I2C_BUZZER   // Enable buzzer on LCD (optional)
217
  #define ULTIPANEL
218
 
219
#elif ENABLED(LCD_I2C_VIKI)
220
 
221
  /**
222
   * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
223
   *
224
   * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
225
   * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
226
   * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
227
   *       BTN_ENC pin (or set BTN_ENC to -1 if not used)
228
   */
229
  #define LCD_I2C_TYPE_MCP23017
230
  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
231
  #define LCD_USE_I2C_BUZZER   // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
232
  #define ULTIPANEL
233
 
234
  #define ENCODER_FEEDRATE_DEADZONE 4
235
 
236
  #define STD_ENCODER_PULSES_PER_STEP 1
237
  #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
238
 
239
#elif ENABLED(G3D_PANEL)
240
 
241
  #define STD_ENCODER_PULSES_PER_STEP 2
242
  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
243
 
244
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
245
   || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
246
   || ENABLED(OLED_PANEL_TINYBOY2) \
247
   || ENABLED(BQ_LCD_SMART_CONTROLLER) \
248
   || ENABLED(LCD_I2C_PANELOLU2) \
249
   || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
250
  #define STD_ENCODER_PULSES_PER_STEP 4
251
  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
252
#endif
253
 
254
#ifndef STD_ENCODER_PULSES_PER_STEP
255
  #define STD_ENCODER_PULSES_PER_STEP 5
256
#endif
257
#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
258
  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
259
#endif
260
#ifndef ENCODER_PULSES_PER_STEP
261
  #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
262
#endif
263
#ifndef ENCODER_STEPS_PER_MENU_ITEM
264
  #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
265
#endif
266
#ifndef ENCODER_FEEDRATE_DEADZONE
267
  #define ENCODER_FEEDRATE_DEADZONE 6
268
#endif
269
 
270
// Shift register panels
271
// ---------------------
272
// 2 wire Non-latching LCD SR from:
273
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
274
 
275
#if ENABLED(SAV_3DLCD)
276
  #define SR_LCD_2W_NL    // Non latching 2 wire shift register
277
  #define ULTIPANEL
278
#endif
279
 
280
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
281
  #ifndef LCD_WIDTH
282
    #ifdef LCD_WIDTH_OVERRIDE
283
      #define LCD_WIDTH LCD_WIDTH_OVERRIDE
284
    #else
285
      #define LCD_WIDTH 22
286
    #endif
287
  #endif
288
  #ifndef LCD_HEIGHT
289
    #define LCD_HEIGHT 5
290
  #endif
291
#endif
292
 
293
#if ENABLED(NO_LCD_MENUS)
294
  #undef ULTIPANEL
295
#endif
296
 
297
#if ENABLED(ULTIPANEL)
298
  #define NEWPANEL  // Disable this if you actually have no click-encoder panel
299
  #define ULTRA_LCD
300
  #ifndef LCD_WIDTH
301
    #define LCD_WIDTH 20
302
  #endif
303
  #ifndef LCD_HEIGHT
304
    #define LCD_HEIGHT 4
305
  #endif
306
#elif ENABLED(ULTRA_LCD)  // no panel but just LCD
307
  #ifndef LCD_WIDTH
308
    #define LCD_WIDTH 16
309
  #endif
310
  #ifndef LCD_HEIGHT
311
    #define LCD_HEIGHT 2
312
  #endif
313
#endif
314
 
315
#if ENABLED(DOGLCD)
316
  /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
317
  // \x00 intentionally skipped to avoid problems in strings
318
  #define LCD_STR_REFRESH     "\x01"
319
  #define LCD_STR_FOLDER      "\x02"
320
  #define LCD_STR_ARROW_RIGHT "\x03"
321
  #define LCD_STR_UPLEVEL     "\x04"
322
  #define LCD_STR_CLOCK       "\x05"
323
  #define LCD_STR_FEEDRATE    "\x06"
324
  #define LCD_STR_BEDTEMP     "\x07"
325
  #define LCD_STR_THERMOMETER "\x08"
326
  #define LCD_STR_DEGREE      "\x09"
327
 
328
  #define LCD_STR_SPECIAL_MAX '\x09'
329
  // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
330
  // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
331
 
332
  // Symbol characters
333
  #define LCD_STR_FILAM_DIA   "\xf8"
334
  #define LCD_STR_FILAM_MUL   "\xa4"
335
#else
336
  // Custom characters defined in the first 8 characters of the LCD
337
  #define LCD_BEDTEMP_CHAR     0x00  // Print only as a char. This will have 'unexpected' results when used in a string!
338
  #define LCD_DEGREE_CHAR      0x01
339
  #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
340
  #define LCD_UPLEVEL_CHAR     0x03
341
  #define LCD_STR_REFRESH     "\x04"
342
  #define LCD_STR_FOLDER      "\x05"
343
  #define LCD_FEEDRATE_CHAR    0x06
344
  #define LCD_CLOCK_CHAR       0x07
345
  #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
346
#endif
347
 
348
/**
349
 * Default LCD contrast for dogm-like LCD displays
350
 */
351
#if ENABLED(DOGLCD)
352
 
353
  #define HAS_LCD_CONTRAST ( \
354
      ENABLED(MAKRPANEL) \
355
   || ENABLED(CARTESIO_UI) \
356
   || ENABLED(VIKI2) \
357
   || ENABLED(miniVIKI) \
358
   || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
359
  )
360
 
361
  #if HAS_LCD_CONTRAST
362
    #ifndef LCD_CONTRAST_MIN
363
      #define LCD_CONTRAST_MIN 0
364
    #endif
365
    #ifndef LCD_CONTRAST_MAX
366
      #define LCD_CONTRAST_MAX 63
367
    #endif
368
    #ifndef DEFAULT_LCD_CONTRAST
369
      #define DEFAULT_LCD_CONTRAST 32
370
    #endif
371
  #endif
372
#endif
373
 
374
// Boot screens
375
#if DISABLED(ULTRA_LCD)
376
  #undef SHOW_BOOTSCREEN
377
#elif !defined(BOOTSCREEN_TIMEOUT)
378
  #define BOOTSCREEN_TIMEOUT 2500
379
#endif
380
 
381
#define HAS_DEBUG_MENU (ENABLED(ULTIPANEL) && ENABLED(LCD_PROGRESS_BAR_TEST))
382
 
383
/**
384
 * Extruders have some combination of stepper motors and hotends
385
 * so we separate these concepts into the defines:
386
 *
387
 *  EXTRUDERS    - Number of Selectable Tools
388
 *  HOTENDS      - Number of hotends, whether connected or separate
389
 *  E_STEPPERS   - Number of actual E stepper motors
390
 *  E_MANUAL     - Number of E steppers for LCD move options
391
 *
392
 */
393
#if ENABLED(SWITCHING_EXTRUDER)                               // One stepper for every two EXTRUDERS
394
  #if EXTRUDERS > 4
395
    #define E_STEPPERS    3
396
  #elif EXTRUDERS > 2
397
    #define E_STEPPERS    2
398
  #else
399
    #define E_STEPPERS    1
400
  #endif
401
  #if DISABLED(SWITCHING_NOZZLE)
402
    #define HOTENDS       E_STEPPERS
403
  #endif
404
  #define E_MANUAL        EXTRUDERS
405
#elif ENABLED(MIXING_EXTRUDER)
406
  #define E_STEPPERS      MIXING_STEPPERS
407
  #define E_MANUAL        1
408
#else
409
  #define E_STEPPERS      EXTRUDERS
410
  #define E_MANUAL        EXTRUDERS
411
#endif
412
 
413
// No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
414
#if ENABLED(MK2_MULTIPLEXER) || ENABLED(SWITCHING_NOZZLE)
415
  #undef DISABLE_INACTIVE_EXTRUDER
416
#endif
417
 
418
// MK2 Multiplexer forces SINGLENOZZLE
419
#if ENABLED(MK2_MULTIPLEXER)
420
  #define SINGLENOZZLE
421
#endif
422
 
423
#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER)         // One hotend, one thermistor, no XY offset
424
  #undef HOTENDS
425
  #define HOTENDS       1
426
  #undef TEMP_SENSOR_1_AS_REDUNDANT
427
  #undef HOTEND_OFFSET_X
428
  #undef HOTEND_OFFSET_Y
429
#endif
430
 
431
#ifndef HOTENDS
432
  #define HOTENDS EXTRUDERS
433
#endif
434
 
435
#define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
436
 
437
/**
438
 * DISTINCT_E_FACTORS affects how some E factors are accessed
439
 */
440
#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
441
  #define XYZE_N (XYZ + E_STEPPERS)
442
  #if ENABLED(HANGPRINTER)
443
    #define NUM_AXIS_N (ABCD + E_STEPPERS)
444
  #else
445
    #define NUM_AXIS_N (XYZ + E_STEPPERS)
446
  #endif
447
  #define E_AXIS_N (E_AXIS + extruder)
448
#else
449
  #undef DISTINCT_E_FACTORS
450
  #define XYZE_N XYZE
451
  #if ENABLED(HANGPRINTER)
452
    #define NUM_AXIS_N ABCDE
453
  #else
454
    #define NUM_AXIS_N XYZE
455
  #endif
456
  #define E_AXIS_N E_AXIS
457
#endif
458
 
459
/**
460
 * The BLTouch Probe emulates a servo probe
461
 * and uses "special" angles for its state.
462
 */
463
#if ENABLED(BLTOUCH)
464
  #ifndef Z_PROBE_SERVO_NR
465
    #define Z_PROBE_SERVO_NR 0
466
  #endif
467
  #ifndef NUM_SERVOS
468
    #define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
469
  #endif
470
  #undef DEACTIVATE_SERVOS_AFTER_MOVE
471
  #if NUM_SERVOS == 1
472
    #undef SERVO_DELAY
473
    #define SERVO_DELAY { 50 }
474
  #endif
475
  #ifndef BLTOUCH_DELAY
476
    #define BLTOUCH_DELAY 375
477
  #endif
478
  #undef Z_SERVO_ANGLES
479
  #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
480
  #define BLTOUCH_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
481
 
482
  #define BLTOUCH_DEPLOY       10
483
  #define BLTOUCH_SW_MODE      60
484
  #define BLTOUCH_STOW         90
485
  #define BLTOUCH_SELFTEST    120
486
  #define BLTOUCH_MODE_STORE  130
487
  #define BLTOUCH_5V_MODE     140
488
  #define BLTOUCH_OD_MODE     150
489
  #define BLTOUCH_RESET       160
490
 
491
/**
492
 * The following commands require different minimum delays.
493
 *
494
 * 500ms required for a reliable Reset.
495
 *
496
 * 750ms required for Deploy/Stow, otherwise the alarm state
497
 *       will not be seen until the following move command.
498
 */
499
 
500
#ifndef BLTOUCH_SET5V_DELAY
501
  #define BLTOUCH_SET5V_DELAY   150
502
#endif
503
#ifndef BLTOUCH_SETOD_DELAY
504
  #define BLTOUCH_SETOD_DELAY   150
505
#endif
506
#ifndef BLTOUCH_MODE_STORE_DELAY
507
  #define BLTOUCH_MODE_STORE_DELAY 150
508
#endif
509
#ifndef BLTOUCH_DEPLOY_DELAY
510
  #define BLTOUCH_DEPLOY_DELAY   750
511
#endif
512
#ifndef BLTOUCH_STOW_DELAY
513
  #define BLTOUCH_STOW_DELAY     750
514
#endif
515
#ifndef BLTOUCH_RESET_DELAY
516
  #define BLTOUCH_RESET_DELAY    500
517
#endif
518
 
519
  #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
520
 
521
  // Always disable probe pin inverting for BLTouch
522
  #undef Z_MIN_PROBE_ENDSTOP_INVERTING
523
  #define Z_MIN_PROBE_ENDSTOP_INVERTING false
524
 
525
  #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
526
    #undef Z_MIN_ENDSTOP_INVERTING
527
    #define Z_MIN_ENDSTOP_INVERTING Z_MIN_PROBE_ENDSTOP_INVERTING
528
    #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN)
529
  #else
530
    #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE)
531
  #endif
532
#endif
533
 
534
/**
535
 * Set a flag for a servo probe
536
 */
537
#define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0)
538
 
539
/**
540
 * Set flags for enabled probes
541
 */
542
#define HAS_BED_PROBE (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_PROBE || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
543
#define PROBE_SELECTED (HAS_BED_PROBE || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING))
544
 
545
#if !HAS_BED_PROBE
546
  // Clear probe pin settings when no probe is selected
547
  #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
548
  #undef Z_MIN_PROBE_ENDSTOP
549
#elif ENABLED(Z_PROBE_ALLEN_KEY)
550
  // Extra test for Allen Key Probe
551
  #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
552
#endif
553
 
554
#define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
555
 
556
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
557
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
558
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
559
 
560
#define USE_MARLINSERIAL !(defined(__AVR__) && defined(USBCON))
561
 
562
#endif // CONDITIONALS_LCD_H