My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Conditionals_LCD.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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. #pragma once
  23. /**
  24. * Conditionals_LCD.h
  25. * Conditionals that need to be set before Configuration_adv.h or pins.h
  26. */
  27. #if ENABLED(CARTESIO_UI)
  28. #define DOGLCD
  29. #define IS_ULTIPANEL
  30. #define DEFAULT_LCD_CONTRAST 90
  31. #define LCD_CONTRAST_MIN 60
  32. #define LCD_CONTRAST_MAX 140
  33. #elif ENABLED(ZONESTAR_LCD)
  34. #define ADC_KEYPAD
  35. #define IS_RRW_KEYPAD
  36. #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
  37. #define ADC_KEY_NUM 8
  38. #define IS_ULTIPANEL
  39. // This helps to implement ADC_KEYPAD menus
  40. #define REVERSE_MENU_DIRECTION
  41. #define ENCODER_PULSES_PER_STEP 1
  42. #define ENCODER_STEPS_PER_MENU_ITEM 1
  43. #define ENCODER_FEEDRATE_DEADZONE 2
  44. #elif ENABLED(RADDS_DISPLAY)
  45. #define IS_ULTIPANEL
  46. #define ENCODER_PULSES_PER_STEP 2
  47. #elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
  48. #define IS_RRD_FG_SC
  49. #elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
  50. #define IS_ULTRA_LCD
  51. #define DOGLCD
  52. #define IS_ULTIPANEL
  53. #if ENABLED(miniVIKI)
  54. #define LCD_CONTRAST_MIN 75
  55. #define LCD_CONTRAST_MAX 115
  56. #define DEFAULT_LCD_CONTRAST 95
  57. #define U8GLIB_ST7565_64128N
  58. #elif ENABLED(VIKI2)
  59. #define LCD_CONTRAST_MIN 0
  60. #define LCD_CONTRAST_MAX 255
  61. #define DEFAULT_LCD_CONTRAST 140
  62. #define U8GLIB_ST7565_64128N
  63. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  64. #define LCD_CONTRAST_MIN 90
  65. #define LCD_CONTRAST_MAX 130
  66. #define DEFAULT_LCD_CONTRAST 110
  67. #define U8GLIB_LM6059_AF
  68. #define SD_DETECT_INVERTED
  69. #elif ENABLED(AZSMZ_12864)
  70. #define LCD_CONTRAST_MIN 120
  71. #define LCD_CONTRAST_MAX 255
  72. #define DEFAULT_LCD_CONTRAST 190
  73. #define U8GLIB_ST7565_64128N
  74. #endif
  75. #elif ENABLED(OLED_PANEL_TINYBOY2)
  76. #define IS_U8GLIB_SSD1306
  77. #define IS_ULTIPANEL
  78. #elif ENABLED(RA_CONTROL_PANEL)
  79. #define LCD_I2C_TYPE_PCA8574
  80. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  81. #define IS_ULTIPANEL
  82. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  83. #define DOGLCD
  84. #define U8GLIB_ST7920
  85. #define IS_ULTIPANEL
  86. #elif ENABLED(CR10_STOCKDISPLAY)
  87. #define IS_RRD_FG_SC
  88. #ifndef ST7920_DELAY_1
  89. #define ST7920_DELAY_1 DELAY_NS(125)
  90. #endif
  91. #ifndef ST7920_DELAY_2
  92. #define ST7920_DELAY_2 DELAY_NS(125)
  93. #endif
  94. #ifndef ST7920_DELAY_3
  95. #define ST7920_DELAY_3 DELAY_NS(125)
  96. #endif
  97. #elif ENABLED(MKS_12864OLED)
  98. #define IS_RRD_SC
  99. #define U8GLIB_SH1106
  100. #elif ENABLED(MKS_12864OLED_SSD1306)
  101. #define IS_RRD_SC
  102. #define IS_U8GLIB_SSD1306
  103. #elif ENABLED(MKS_MINI_12864)
  104. #define MINIPANEL
  105. #define DEFAULT_LCD_CONTRAST 150
  106. #define LCD_CONTRAST_MAX 255
  107. #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
  108. #define FYSETC_MINI_12864
  109. #define DOGLCD
  110. #define IS_ULTIPANEL
  111. #define LCD_CONTRAST_MIN 0
  112. #define LCD_CONTRAST_MAX 255
  113. #define DEFAULT_LCD_CONTRAST 220
  114. #define LED_COLORS_REDUCE_GREEN
  115. #if HAS_POWER_SWITCH && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
  116. #define LED_BACKLIGHT_TIMEOUT 10000
  117. #endif
  118. // Require LED backlighting enabled
  119. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  120. #define RGB_LED
  121. #elif ENABLED(FYSETC_MINI_12864_2_1)
  122. #define NEOPIXEL_LED
  123. #undef NEOPIXEL_TYPE
  124. #define NEOPIXEL_TYPE NEO_RGB
  125. #if NEOPIXEL_PIXELS < 3
  126. #undef NEOPIXELS_PIXELS
  127. #define NEOPIXEL_PIXELS 3
  128. #endif
  129. #ifndef NEOPIXEL_BRIGHTNESS
  130. #define NEOPIXEL_BRIGHTNESS 127
  131. #endif
  132. //#define NEOPIXEL_STARTUP_TEST
  133. #endif
  134. #elif ENABLED(ULTI_CONTROLLER)
  135. #define U8GLIB_SSD1309
  136. #define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
  137. #define LCD_CONTRAST_MIN 0
  138. #define LCD_CONTRAST_MAX 254
  139. #define DEFAULT_LCD_CONTRAST 127
  140. #define ENCODER_PULSES_PER_STEP 2
  141. #define ENCODER_STEPS_PER_MENU_ITEM 2
  142. #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
  143. #define IS_RRD_SC
  144. #define LCD_WIDTH 16
  145. #define LCD_HEIGHT 2
  146. #endif
  147. #if ENABLED(IS_RRD_FG_SC)
  148. #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  149. #endif
  150. #if EITHER(MAKRPANEL, MINIPANEL)
  151. #define IS_ULTIPANEL
  152. #define DOGLCD
  153. #if ENABLED(MAKRPANEL)
  154. #define U8GLIB_ST7565_64128N
  155. #endif
  156. #ifndef DEFAULT_LCD_CONTRAST
  157. #define DEFAULT_LCD_CONTRAST 17
  158. #endif
  159. #endif
  160. #if ENABLED(IS_U8GLIB_SSD1306)
  161. #define U8GLIB_SSD1306
  162. #endif
  163. // 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
  164. #define HAS_SSD1306_OLED_I2C ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106)
  165. #if HAS_SSD1306_OLED_I2C
  166. #define IS_ULTRA_LCD
  167. #define DOGLCD
  168. #endif
  169. #if ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
  170. #define DOGLCD
  171. #define U8GLIB_ST7920
  172. #define IS_RRD_SC
  173. #endif
  174. #if ENABLED(IS_RRD_SC)
  175. #define REPRAP_DISCOUNT_SMART_CONTROLLER
  176. #endif
  177. #if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, ULTI_CONTROLLER, PANEL_ONE, U8GLIB_SH1106)
  178. #define IS_ULTIPANEL
  179. #endif
  180. /**
  181. * SPI PANELS
  182. */
  183. // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
  184. #if ENABLED(U8GLIB_SH1106_EINSTART)
  185. #define DOGLCD
  186. #define IS_ULTIPANEL
  187. #endif
  188. /**
  189. * FSMC/SPI TFT PANELS
  190. */
  191. #if ENABLED(MKS_ROBIN_TFT)
  192. #define DOGLCD
  193. #define IS_ULTIPANEL
  194. #define DELAYED_BACKLIGHT_INIT
  195. #endif
  196. /**
  197. * I2C PANELS
  198. */
  199. #if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
  200. #define LCD_I2C_TYPE_PCF8575
  201. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  202. #if ENABLED(LCD_SAINSMART_I2C_2004)
  203. #define LCD_WIDTH 20
  204. #define LCD_HEIGHT 4
  205. #endif
  206. #elif ENABLED(LCD_I2C_PANELOLU2)
  207. // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
  208. #define LCD_I2C_TYPE_MCP23017
  209. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  210. #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
  211. #define IS_ULTIPANEL
  212. #elif ENABLED(LCD_I2C_VIKI)
  213. /**
  214. * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
  215. *
  216. * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  217. * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  218. * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
  219. * BTN_ENC pin (or set BTN_ENC to -1 if not used)
  220. */
  221. #define LCD_I2C_TYPE_MCP23017
  222. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  223. #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
  224. #define IS_ULTIPANEL
  225. #define ENCODER_FEEDRATE_DEADZONE 4
  226. #define STD_ENCODER_PULSES_PER_STEP 1
  227. #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
  228. #elif ENABLED(G3D_PANEL)
  229. #define STD_ENCODER_PULSES_PER_STEP 2
  230. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  231. #elif ANY(REPRAP_DISCOUNT_SMART_CONTROLLER, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
  232. #define STD_ENCODER_PULSES_PER_STEP 4
  233. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  234. #endif
  235. #ifndef STD_ENCODER_PULSES_PER_STEP
  236. #define STD_ENCODER_PULSES_PER_STEP 5
  237. #endif
  238. #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
  239. #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
  240. #endif
  241. #ifndef ENCODER_PULSES_PER_STEP
  242. #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
  243. #endif
  244. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  245. #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
  246. #endif
  247. #ifndef ENCODER_FEEDRATE_DEADZONE
  248. #define ENCODER_FEEDRATE_DEADZONE 6
  249. #endif
  250. // Shift register panels
  251. // ---------------------
  252. // 2 wire Non-latching LCD SR from:
  253. // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
  254. #if ENABLED(FF_INTERFACEBOARD)
  255. #define SR_LCD_3W_NL // Non latching 3 wire shift register
  256. #define IS_ULTIPANEL
  257. #elif ENABLED(SAV_3DLCD)
  258. #define SR_LCD_2W_NL // Non latching 2 wire shift register
  259. #define IS_ULTIPANEL
  260. #endif
  261. #if ENABLED(IS_ULTIPANEL)
  262. #define ULTIPANEL
  263. #endif
  264. #if ENABLED(ULTIPANEL)
  265. #define IS_ULTRA_LCD
  266. #ifndef NEWPANEL
  267. #define NEWPANEL
  268. #endif
  269. #endif
  270. #if ENABLED(IS_ULTRA_LCD)
  271. #define ULTRA_LCD
  272. #endif
  273. #if ENABLED(IS_RRW_KEYPAD)
  274. #define REPRAPWORLD_KEYPAD
  275. #endif
  276. // Keypad needs a move step
  277. #if ENABLED(REPRAPWORLD_KEYPAD)
  278. #define NEWPANEL
  279. #ifndef REPRAPWORLD_KEYPAD_MOVE_STEP
  280. #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
  281. #endif
  282. #endif
  283. // Extensible UI serial touch screens. (See src/lcd/extensible_ui)
  284. #if EITHER(MALYAN_LCD, DGUS_LCD)
  285. #define IS_EXTUI
  286. #define EXTENSIBLE_UI
  287. #endif
  288. // Aliases for LCD features
  289. #define HAS_SPI_LCD ENABLED(ULTRA_LCD)
  290. #define HAS_DISPLAY (HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI))
  291. #define HAS_GRAPHICAL_LCD ENABLED(DOGLCD)
  292. #define HAS_CHARACTER_LCD (HAS_SPI_LCD && !HAS_GRAPHICAL_LCD)
  293. #define HAS_LCD_MENU (ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS))
  294. #define HAS_ADC_BUTTONS ENABLED(ADC_KEYPAD)
  295. /**
  296. * Default LCD contrast for Graphical LCD displays
  297. */
  298. #define HAS_LCD_CONTRAST (HAS_GRAPHICAL_LCD && defined(DEFAULT_LCD_CONTRAST))
  299. #if HAS_LCD_CONTRAST
  300. #ifndef LCD_CONTRAST_MIN
  301. #define LCD_CONTRAST_MIN 0
  302. #endif
  303. #ifndef LCD_CONTRAST_MAX
  304. #define LCD_CONTRAST_MAX 63
  305. #endif
  306. #ifndef DEFAULT_LCD_CONTRAST
  307. #define DEFAULT_LCD_CONTRAST 32
  308. #endif
  309. #endif
  310. /**
  311. * Extruders have some combination of stepper motors and hotends
  312. * so we separate these concepts into the defines:
  313. *
  314. * EXTRUDERS - Number of Selectable Tools
  315. * HOTENDS - Number of hotends, whether connected or separate
  316. * E_STEPPERS - Number of actual E stepper motors
  317. * E_MANUAL - Number of E steppers for LCD move options
  318. *
  319. */
  320. #if EXTRUDERS == 0
  321. #undef DISTINCT_E_FACTORS
  322. #undef SINGLENOZZLE
  323. #undef SWITCHING_EXTRUDER
  324. #undef SWITCHING_NOZZLE
  325. #undef MIXING_EXTRUDER
  326. #undef MK2_MULTIPLEXER
  327. #undef PRUSA_MMU2
  328. #endif
  329. #if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
  330. #if EXTRUDERS > 4
  331. #define E_STEPPERS 3
  332. #elif EXTRUDERS > 2
  333. #define E_STEPPERS 2
  334. #else
  335. #define E_STEPPERS 1
  336. #endif
  337. #if DISABLED(SWITCHING_NOZZLE)
  338. #define HOTENDS E_STEPPERS
  339. #endif
  340. #elif ENABLED(MIXING_EXTRUDER)
  341. #define E_STEPPERS MIXING_STEPPERS
  342. #define E_MANUAL 1
  343. #define DUAL_MIXING_EXTRUDER (MIXING_STEPPERS == 2)
  344. #elif ENABLED(SWITCHING_TOOLHEAD)
  345. #define E_STEPPERS EXTRUDERS
  346. #define E_MANUAL EXTRUDERS
  347. #elif ENABLED(PRUSA_MMU2)
  348. #define E_STEPPERS 1
  349. #endif
  350. // No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
  351. #if EITHER(MK2_MULTIPLEXER, SWITCHING_NOZZLE)
  352. #undef DISABLE_INACTIVE_EXTRUDER
  353. #endif
  354. // Prusa MK2 Multiplexer and MMU 2.0 force SINGLENOZZLE
  355. #if EITHER(MK2_MULTIPLEXER, PRUSA_MMU2)
  356. #define SINGLENOZZLE
  357. #endif
  358. #if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
  359. #undef HOTENDS
  360. #define HOTENDS 1
  361. #undef TEMP_SENSOR_1_AS_REDUNDANT
  362. #undef HOTEND_OFFSET_X
  363. #undef HOTEND_OFFSET_Y
  364. #endif
  365. #ifndef HOTENDS
  366. #define HOTENDS EXTRUDERS
  367. #endif
  368. #ifndef E_STEPPERS
  369. #define E_STEPPERS EXTRUDERS
  370. #endif
  371. #ifndef E_MANUAL
  372. #define E_MANUAL EXTRUDERS
  373. #endif
  374. #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
  375. #define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
  376. #define SWITCHING_NOZZLE_TWO_SERVOS defined(SWITCHING_NOZZLE_E1_SERVO_NR)
  377. #define HAS_HOTEND_OFFSET (HOTENDS > 1)
  378. #define HAS_DUPLICATION_MODE EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
  379. /**
  380. * DISTINCT_E_FACTORS affects how some E factors are accessed
  381. */
  382. #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
  383. #define XYZE_N (XYZ + E_STEPPERS)
  384. #define E_AXIS_N(E) AxisEnum(E_AXIS + E)
  385. #define UNUSED_E(E) NOOP
  386. #else
  387. #undef DISTINCT_E_FACTORS
  388. #define XYZE_N XYZE
  389. #define E_AXIS_N(E) E_AXIS
  390. #define UNUSED_E(E) UNUSED(E)
  391. #endif
  392. /**
  393. * The BLTouch Probe emulates a servo probe
  394. * and uses "special" angles for its state.
  395. */
  396. #if ENABLED(BLTOUCH)
  397. #ifndef Z_PROBE_SERVO_NR
  398. #define Z_PROBE_SERVO_NR 0
  399. #endif
  400. #ifndef NUM_SERVOS
  401. #define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
  402. #endif
  403. #undef DEACTIVATE_SERVOS_AFTER_MOVE
  404. #if NUM_SERVOS == 1
  405. #undef SERVO_DELAY
  406. #define SERVO_DELAY { 50 }
  407. #endif
  408. // Always disable probe pin inverting for BLTouch
  409. #undef Z_MIN_PROBE_ENDSTOP_INVERTING
  410. #define Z_MIN_PROBE_ENDSTOP_INVERTING false
  411. #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  412. #undef Z_MIN_ENDSTOP_INVERTING
  413. #define Z_MIN_ENDSTOP_INVERTING false
  414. #endif
  415. #endif
  416. #ifndef PREHEAT_1_LABEL
  417. #define PREHEAT_1_LABEL "PLA"
  418. #endif
  419. #ifndef PREHEAT_2_LABEL
  420. #define PREHEAT_2_LABEL "ABS"
  421. #endif
  422. /**
  423. * Set a flag for a servo probe
  424. */
  425. #define HAS_Z_SERVO_PROBE (defined(Z_PROBE_SERVO_NR) && Z_PROBE_SERVO_NR >= 0)
  426. /**
  427. * Set flags for enabled probes
  428. */
  429. #define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE))
  430. #define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
  431. #if HAS_BED_PROBE
  432. #define USES_Z_MIN_PROBE_ENDSTOP DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  433. #define HOMING_Z_WITH_PROBE (Z_HOME_DIR < 0 && !USES_Z_MIN_PROBE_ENDSTOP)
  434. #ifndef Z_PROBE_LOW_POINT
  435. #define Z_PROBE_LOW_POINT -5
  436. #endif
  437. #if ENABLED(Z_PROBE_ALLEN_KEY)
  438. #define PROBE_TRIGGERED_WHEN_STOWED_TEST // Extra test for Allen Key Probe
  439. #endif
  440. #ifdef MULTIPLE_PROBING
  441. #if EXTRA_PROBING
  442. #define TOTAL_PROBING (MULTIPLE_PROBING + EXTRA_PROBING)
  443. #else
  444. #define TOTAL_PROBING MULTIPLE_PROBING
  445. #endif
  446. #endif
  447. #else
  448. // Clear probe pin settings when no probe is selected
  449. #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
  450. #endif
  451. #ifdef GRID_MAX_POINTS_X
  452. #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
  453. #endif
  454. #define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
  455. #define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
  456. #define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
  457. #define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE)
  458. #define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
  459. #define HAS_SERVICE_INTERVALS (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0)
  460. #define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
  461. #define Z_MULTI_STEPPER_DRIVERS EITHER(Z_DUAL_STEPPER_DRIVERS, Z_TRIPLE_STEPPER_DRIVERS)
  462. #define Z_MULTI_ENDSTOPS EITHER(Z_DUAL_ENDSTOPS, Z_TRIPLE_ENDSTOPS)
  463. #define HAS_EXTRA_ENDSTOPS (EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS)
  464. #define HAS_GAMES ANY(MARLIN_BRICKOUT, MARLIN_INVADERS, MARLIN_SNAKE, MARLIN_MAZE)
  465. #define HAS_GAME_MENU (1 < ENABLED(MARLIN_BRICKOUT) + ENABLED(MARLIN_INVADERS) + ENABLED(MARLIN_SNAKE) + ENABLED(MARLIN_MAZE))
  466. #define IS_SCARA ENABLED(MORGAN_SCARA)
  467. #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
  468. #define IS_CARTESIAN !IS_KINEMATIC
  469. #ifndef INVERT_X_DIR
  470. #define INVERT_X_DIR false
  471. #endif
  472. #ifndef INVERT_Y_DIR
  473. #define INVERT_Y_DIR false
  474. #endif
  475. #ifndef INVERT_Z_DIR
  476. #define INVERT_Z_DIR false
  477. #endif
  478. #ifndef INVERT_E_DIR
  479. #define INVERT_E_DIR false
  480. #endif
  481. #if ENABLED(HOST_ACTION_COMMANDS)
  482. #ifndef ACTION_ON_PAUSE
  483. #define ACTION_ON_PAUSE "pause"
  484. #endif
  485. #ifndef ACTION_ON_RESUME
  486. #define ACTION_ON_RESUME "resume"
  487. #endif
  488. #ifndef ACTION_ON_PAUSED
  489. #define ACTION_ON_PAUSED "paused"
  490. #endif
  491. #ifndef ACTION_ON_RESUMED
  492. #define ACTION_ON_RESUMED "resumed"
  493. #endif
  494. #ifndef ACTION_ON_CANCEL
  495. #define ACTION_ON_CANCEL "cancel"
  496. #endif
  497. #if ENABLED(G29_RETRY_AND_RECOVER)
  498. #ifndef ACTION_ON_G29_RECOVER
  499. #define ACTION_ON_G29_RECOVER "probe_rewipe"
  500. #endif
  501. #ifndef ACTION_ON_G29_FAILURE
  502. #define ACTION_ON_G29_FAILURE "probe_failed"
  503. #endif
  504. #endif
  505. #endif
  506. #if ENABLED(SLIM_LCD_MENUS)
  507. #define BOOT_MARLIN_LOGO_SMALL
  508. #endif
  509. #define IS_RE_ARM_BOARD (MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF))
  510. #define HAS_SDCARD_CONNECTION EITHER(TARGET_LPC1768, ADAFRUIT_GRAND_CENTRAL_M4)