My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Conditionals_LCD.h 16KB

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