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

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