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.h 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  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. * Conditionals.h
  24. * Defines that depend on configuration but are not editable.
  25. */
  26. #ifndef CONDITIONALS_H
  27. /**
  28. * Miscellaneous
  29. */
  30. #ifndef M_PI
  31. #define M_PI 3.1415926536
  32. #endif
  33. /**
  34. * This value is used by M109 when tying to calculate a ballpark safe margin
  35. * to prevent wait-forever situation.
  36. */
  37. #ifndef EXTRUDE_MINTEMP
  38. #define EXTRUDE_MINTEMP 170
  39. #endif
  40. #ifndef CONFIGURATION_LCD // Get the LCD defines which are needed first
  41. #define CONFIGURATION_LCD
  42. #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
  43. #if ENABLED(CARTESIO_UI)
  44. #define DOGLCD
  45. #define ULTIPANEL
  46. #define NEWPANEL
  47. #define DEFAULT_LCD_CONTRAST 90
  48. #define LCD_CONTRAST_MIN 60
  49. #define LCD_CONTRAST_MAX 140
  50. #endif
  51. #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
  52. #define DOGLCD
  53. #define ULTIPANEL
  54. #define NEWPANEL
  55. #define DEFAULT_LCD_CONTRAST 17
  56. #endif
  57. #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  58. #define ULTRA_LCD //general LCD support, also 16x2
  59. #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
  60. #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
  61. #if ENABLED(miniVIKI)
  62. #define LCD_CONTRAST_MIN 75
  63. #define LCD_CONTRAST_MAX 115
  64. #define DEFAULT_LCD_CONTRAST 95
  65. #elif ENABLED(VIKI2)
  66. #define DEFAULT_LCD_CONTRAST 40
  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. #endif
  74. #define ENCODER_PULSES_PER_STEP 4
  75. #define ENCODER_STEPS_PER_MENU_ITEM 1
  76. #endif
  77. // Generic support for SSD1306 / SH1106 OLED based LCDs.
  78. #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
  79. #define ULTRA_LCD //general LCD support, also 16x2
  80. #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
  81. #endif
  82. #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
  83. #define ULTIMAKERCONTROLLER
  84. #endif
  85. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  86. #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  87. #ifndef ENCODER_PULSES_PER_STEP
  88. #define ENCODER_PULSES_PER_STEP 4
  89. #endif
  90. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  91. #define ENCODER_STEPS_PER_MENU_ITEM 1
  92. #endif
  93. #ifndef LONG_FILENAME_HOST_SUPPORT
  94. #define LONG_FILENAME_HOST_SUPPORT
  95. #endif
  96. #endif
  97. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  98. #define DOGLCD
  99. #define U8GLIB_ST7920
  100. #define REPRAP_DISCOUNT_SMART_CONTROLLER
  101. #endif
  102. #if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(RIGIDBOT_PANEL) || ENABLED(REPRAPWORLD_KEYPAD)
  103. #define ULTIPANEL
  104. #define NEWPANEL
  105. #endif
  106. #if ENABLED(RA_CONTROL_PANEL)
  107. #define LCD_I2C_TYPE_PCA8574
  108. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  109. #define ULTIPANEL
  110. #define NEWPANEL
  111. #endif
  112. /**
  113. * I2C PANELS
  114. */
  115. #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
  116. // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
  117. // Make sure it is placed in the Arduino libraries directory.
  118. #define LCD_I2C_TYPE_PCF8575
  119. #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
  120. #define ULTIPANEL
  121. #define NEWPANEL
  122. #endif
  123. // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
  124. #if ENABLED(LCD_I2C_PANELOLU2)
  125. #define LCD_I2C_TYPE_MCP23017
  126. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  127. #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
  128. #ifndef ENCODER_PULSES_PER_STEP
  129. #define ENCODER_PULSES_PER_STEP 4
  130. #endif
  131. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  132. #define ENCODER_STEPS_PER_MENU_ITEM 1
  133. #endif
  134. #define ULTIPANEL
  135. #define NEWPANEL
  136. #endif
  137. // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
  138. #if ENABLED(LCD_I2C_VIKI)
  139. // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  140. // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  141. // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
  142. // BTN_ENC pin (or set BTN_ENC to -1 if not used)
  143. #define LCD_I2C_TYPE_MCP23017
  144. #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  145. #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
  146. #define ULTIPANEL
  147. #define NEWPANEL
  148. #endif
  149. // Shift register panels
  150. // ---------------------
  151. // 2 wire Non-latching LCD SR from:
  152. // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
  153. #if ENABLED(SAV_3DLCD)
  154. #define SR_LCD_2W_NL // Non latching 2 wire shift register
  155. #define ULTIPANEL
  156. #define NEWPANEL
  157. #endif
  158. #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
  159. #ifndef LCD_WIDTH
  160. #define LCD_WIDTH 22
  161. #endif
  162. #ifndef LCD_HEIGHT
  163. #define LCD_HEIGHT 5
  164. #endif
  165. #endif
  166. #if ENABLED(ULTIPANEL)
  167. #define NEWPANEL //enable this if you have a click-encoder panel
  168. #define ULTRA_LCD
  169. #ifndef LCD_WIDTH
  170. #define LCD_WIDTH 20
  171. #endif
  172. #ifndef LCD_HEIGHT
  173. #define LCD_HEIGHT 4
  174. #endif
  175. #else //no panel but just LCD
  176. #if ENABLED(ULTRA_LCD)
  177. #ifndef LCD_WIDTH
  178. #define LCD_WIDTH 16
  179. #endif
  180. #ifndef LCD_HEIGHT
  181. #define LCD_HEIGHT 2
  182. #endif
  183. #endif
  184. #endif
  185. #if ENABLED(DOGLCD)
  186. /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
  187. // \x00 intentionally skipped to avoid problems in strings
  188. #define LCD_STR_REFRESH "\x01"
  189. #define LCD_STR_FOLDER "\x02"
  190. #define LCD_STR_ARROW_RIGHT "\x03"
  191. #define LCD_STR_UPLEVEL "\x04"
  192. #define LCD_STR_CLOCK "\x05"
  193. #define LCD_STR_FEEDRATE "\x06"
  194. #define LCD_STR_BEDTEMP "\x07"
  195. #define LCD_STR_THERMOMETER "\x08"
  196. #define LCD_STR_DEGREE "\x09"
  197. #define LCD_STR_SPECIAL_MAX '\x09'
  198. // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
  199. // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
  200. #else
  201. /* Custom characters defined in the first 8 characters of the LCD */
  202. #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
  203. #define LCD_STR_DEGREE "\x01"
  204. #define LCD_STR_THERMOMETER "\x02"
  205. #define LCD_STR_UPLEVEL "\x03"
  206. #define LCD_STR_REFRESH "\x04"
  207. #define LCD_STR_FOLDER "\x05"
  208. #define LCD_STR_FEEDRATE "\x06"
  209. #define LCD_STR_CLOCK "\x07"
  210. #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
  211. #endif
  212. /**
  213. * Default LCD contrast for dogm-like LCD displays
  214. */
  215. #if ENABLED(DOGLCD)
  216. #define HAS_LCD_CONTRAST ( \
  217. ENABLED(MAKRPANEL) \
  218. || ENABLED(CARTESIO_UI) \
  219. || ENABLED(VIKI2) \
  220. || ENABLED(miniVIKI) \
  221. || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
  222. )
  223. #if HAS_LCD_CONTRAST
  224. #ifndef LCD_CONTRAST_MIN
  225. #define LCD_CONTRAST_MIN 0
  226. #endif
  227. #ifndef LCD_CONTRAST_MAX
  228. #define LCD_CONTRAST_MAX 63
  229. #endif
  230. #ifndef DEFAULT_LCD_CONTRAST
  231. #define DEFAULT_LCD_CONTRAST 32
  232. #endif
  233. #endif
  234. #endif
  235. #ifndef BOOTSCREEN_TIMEOUT
  236. #define BOOTSCREEN_TIMEOUT 2500
  237. #endif
  238. #else // CONFIGURATION_LCD
  239. #define CONDITIONALS_H
  240. #include "pins.h"
  241. #ifndef USBCON
  242. #define HardwareSerial_h // trick to disable the standard HWserial
  243. #endif
  244. #if ENABLED(EMERGENCY_PARSER)
  245. #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410"
  246. #else
  247. #define EMERGENCY_PARSER_CAPABILITIES ""
  248. #endif
  249. #include "Arduino.h"
  250. /**
  251. * Set ENDSTOPPULLUPS for unused endstop switches
  252. */
  253. #if ENABLED(ENDSTOPPULLUPS)
  254. #if ENABLED(USE_XMAX_PLUG)
  255. #define ENDSTOPPULLUP_XMAX
  256. #endif
  257. #if ENABLED(USE_YMAX_PLUG)
  258. #define ENDSTOPPULLUP_YMAX
  259. #endif
  260. #if ENABLED(USE_ZMAX_PLUG)
  261. #define ENDSTOPPULLUP_ZMAX
  262. #endif
  263. #if ENABLED(USE_XMIN_PLUG)
  264. #define ENDSTOPPULLUP_XMIN
  265. #endif
  266. #if ENABLED(USE_YMIN_PLUG)
  267. #define ENDSTOPPULLUP_YMIN
  268. #endif
  269. #if ENABLED(USE_ZMIN_PLUG)
  270. #define ENDSTOPPULLUP_ZMIN
  271. #endif
  272. #if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
  273. #define ENDSTOPPULLUP_ZMIN_PROBE
  274. #endif
  275. #endif
  276. /**
  277. * Axis lengths
  278. */
  279. #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
  280. #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
  281. #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
  282. /**
  283. * CoreXY and CoreXZ
  284. */
  285. #if ENABLED(COREXY)
  286. #define CORE_AXIS_1 A_AXIS // XY from A + B
  287. #define CORE_AXIS_2 B_AXIS
  288. #define NORMAL_AXIS Z_AXIS
  289. #elif ENABLED(COREXZ)
  290. #define CORE_AXIS_1 A_AXIS // XZ from A + C
  291. #define CORE_AXIS_2 C_AXIS
  292. #define NORMAL_AXIS Y_AXIS
  293. #elif ENABLED(COREYZ)
  294. #define CORE_AXIS_1 B_AXIS // YZ from B + C
  295. #define CORE_AXIS_2 C_AXIS
  296. #define NORMAL_AXIS X_AXIS
  297. #endif
  298. /**
  299. * SCARA
  300. */
  301. #if ENABLED(SCARA)
  302. #undef SLOWDOWN
  303. #define QUICK_HOME //SCARA needs Quickhome
  304. #endif
  305. /**
  306. * AUTOSET LOCATIONS OF LIMIT SWITCHES
  307. */
  308. #if ENABLED(MANUAL_HOME_POSITIONS) // Use manual limit switch locations
  309. #define X_HOME_POS MANUAL_X_HOME_POS
  310. #define Y_HOME_POS MANUAL_Y_HOME_POS
  311. #define Z_HOME_POS MANUAL_Z_HOME_POS
  312. #else //!MANUAL_HOME_POSITIONS – Use home switch positions based on homing direction and travel limits
  313. #if ENABLED(BED_CENTER_AT_0_0)
  314. #define X_HOME_POS (X_MAX_LENGTH) * (X_HOME_DIR) * 0.5
  315. #define Y_HOME_POS (Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5
  316. #else
  317. #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
  318. #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
  319. #endif
  320. #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS)
  321. #endif //!MANUAL_HOME_POSITIONS
  322. /**
  323. * The BLTouch Probe emulates a servo probe
  324. */
  325. #if ENABLED(BLTOUCH)
  326. #undef Z_ENDSTOP_SERVO_NR
  327. #undef Z_SERVO_ANGLES
  328. #define Z_ENDSTOP_SERVO_NR 0
  329. #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract
  330. #undef DEACTIVATE_SERVOS_AFTER_MOVE
  331. #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  332. #undef Z_MIN_ENDSTOP_INVERTING
  333. #define Z_MIN_ENDSTOP_INVERTING false
  334. #endif
  335. #endif
  336. /**
  337. * Auto Bed Leveling and Z Probe Repeatability Test
  338. */
  339. #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
  340. #if HAS_PROBING_PROCEDURE
  341. // Boundaries for probing based on set limits
  342. #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
  343. #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
  344. #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
  345. #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
  346. #endif
  347. #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
  348. /**
  349. * Z Sled Probe requires Z_SAFE_HOMING
  350. */
  351. #if ENABLED(Z_PROBE_SLED)
  352. #define Z_SAFE_HOMING
  353. #endif
  354. /**
  355. * Safe Homing Options
  356. */
  357. #if ENABLED(Z_SAFE_HOMING)
  358. #ifndef Z_SAFE_HOMING_X_POINT
  359. #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
  360. #endif
  361. #ifndef Z_SAFE_HOMING_Y_POINT
  362. #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
  363. #endif
  364. #endif
  365. /**
  366. * Host keep alive
  367. */
  368. #ifndef DEFAULT_KEEPALIVE_INTERVAL
  369. #define DEFAULT_KEEPALIVE_INTERVAL 2
  370. #endif
  371. /**
  372. * MAX_STEP_FREQUENCY differs for TOSHIBA
  373. */
  374. #if ENABLED(CONFIG_STEPPERS_TOSHIBA)
  375. #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
  376. #else
  377. #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
  378. #endif
  379. // MS1 MS2 Stepper Driver Microstepping mode table
  380. #define MICROSTEP1 LOW,LOW
  381. #define MICROSTEP2 HIGH,LOW
  382. #define MICROSTEP4 LOW,HIGH
  383. #define MICROSTEP8 HIGH,HIGH
  384. #define MICROSTEP16 HIGH,HIGH
  385. /**
  386. * Advance calculated values
  387. */
  388. #if ENABLED(ADVANCE)
  389. #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
  390. #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS] / (EXTRUSION_AREA))
  391. #endif
  392. #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  393. #undef SD_DETECT_INVERTED
  394. #endif
  395. /**
  396. * Set defaults for missing (newer) options
  397. */
  398. #ifndef DISABLE_INACTIVE_X
  399. #define DISABLE_INACTIVE_X DISABLE_X
  400. #endif
  401. #ifndef DISABLE_INACTIVE_Y
  402. #define DISABLE_INACTIVE_Y DISABLE_Y
  403. #endif
  404. #ifndef DISABLE_INACTIVE_Z
  405. #define DISABLE_INACTIVE_Z DISABLE_Z
  406. #endif
  407. #ifndef DISABLE_INACTIVE_E
  408. #define DISABLE_INACTIVE_E DISABLE_E
  409. #endif
  410. // Power Signal Control Definitions
  411. // By default use ATX definition
  412. #ifndef POWER_SUPPLY
  413. #define POWER_SUPPLY 1
  414. #endif
  415. #if (POWER_SUPPLY == 1) // 1 = ATX
  416. #define PS_ON_AWAKE LOW
  417. #define PS_ON_ASLEEP HIGH
  418. #elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W
  419. #define PS_ON_AWAKE HIGH
  420. #define PS_ON_ASLEEP LOW
  421. #endif
  422. #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON))
  423. /**
  424. * Temp Sensor defines
  425. */
  426. #if TEMP_SENSOR_0 == -3
  427. #define HEATER_0_USES_MAX6675
  428. #define MAX6675_IS_MAX31855
  429. #elif TEMP_SENSOR_0 == -2
  430. #define HEATER_0_USES_MAX6675
  431. #elif TEMP_SENSOR_0 == -1
  432. #define HEATER_0_USES_AD595
  433. #elif TEMP_SENSOR_0 == 0
  434. #undef HEATER_0_MINTEMP
  435. #undef HEATER_0_MAXTEMP
  436. #elif TEMP_SENSOR_0 > 0
  437. #define THERMISTORHEATER_0 TEMP_SENSOR_0
  438. #define HEATER_0_USES_THERMISTOR
  439. #endif
  440. #if TEMP_SENSOR_1 <= -2
  441. #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1"
  442. #elif TEMP_SENSOR_1 == -1
  443. #define HEATER_1_USES_AD595
  444. #elif TEMP_SENSOR_1 == 0
  445. #undef HEATER_1_MINTEMP
  446. #undef HEATER_1_MAXTEMP
  447. #elif TEMP_SENSOR_1 > 0
  448. #define THERMISTORHEATER_1 TEMP_SENSOR_1
  449. #define HEATER_1_USES_THERMISTOR
  450. #endif
  451. #if TEMP_SENSOR_2 <= -2
  452. #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2"
  453. #elif TEMP_SENSOR_2 == -1
  454. #define HEATER_2_USES_AD595
  455. #elif TEMP_SENSOR_2 == 0
  456. #undef HEATER_2_MINTEMP
  457. #undef HEATER_2_MAXTEMP
  458. #elif TEMP_SENSOR_2 > 0
  459. #define THERMISTORHEATER_2 TEMP_SENSOR_2
  460. #define HEATER_2_USES_THERMISTOR
  461. #endif
  462. #if TEMP_SENSOR_3 <= -2
  463. #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3"
  464. #elif TEMP_SENSOR_3 == -1
  465. #define HEATER_3_USES_AD595
  466. #elif TEMP_SENSOR_3 == 0
  467. #undef HEATER_3_MINTEMP
  468. #undef HEATER_3_MAXTEMP
  469. #elif TEMP_SENSOR_3 > 0
  470. #define THERMISTORHEATER_3 TEMP_SENSOR_3
  471. #define HEATER_3_USES_THERMISTOR
  472. #endif
  473. #if TEMP_SENSOR_BED <= -2
  474. #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
  475. #elif TEMP_SENSOR_BED == -1
  476. #define BED_USES_AD595
  477. #elif TEMP_SENSOR_BED == 0
  478. #undef BED_MINTEMP
  479. #undef BED_MAXTEMP
  480. #elif TEMP_SENSOR_BED > 0
  481. #define THERMISTORBED TEMP_SENSOR_BED
  482. #define BED_USES_THERMISTOR
  483. #endif
  484. /**
  485. * Flags for PID handling
  486. */
  487. #define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED))
  488. #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED))
  489. /**
  490. * Extruders have some combination of stepper motors and hotends
  491. * so we separate these concepts into the defines:
  492. *
  493. * EXTRUDERS - Number of Selectable Tools
  494. * HOTENDS - Number of hotends, whether connected or separate
  495. * E_STEPPERS - Number of actual E stepper motors
  496. * TOOL_E_INDEX - Index to use when getting/setting the tool state
  497. *
  498. */
  499. #if ENABLED(SINGLENOZZLE) // One hotend, multi-extruder
  500. #define HOTENDS 1
  501. #define E_STEPPERS EXTRUDERS
  502. #define TOOL_E_INDEX current_block->active_extruder
  503. #undef TEMP_SENSOR_1_AS_REDUNDANT
  504. #undef HOTEND_OFFSET_X
  505. #undef HOTEND_OFFSET_Y
  506. #elif ENABLED(SWITCHING_EXTRUDER) // One E stepper, unified E axis, two hotends
  507. #define HOTENDS EXTRUDERS
  508. #define E_STEPPERS 1
  509. #define TOOL_E_INDEX 0
  510. #ifndef HOTEND_OFFSET_Z
  511. #define HOTEND_OFFSET_Z { 0 }
  512. #endif
  513. #elif ENABLED(MIXING_EXTRUDER) // Multi-stepper, unified E axis, one hotend
  514. #define HOTENDS 1
  515. #define E_STEPPERS MIXING_STEPPERS
  516. #define TOOL_E_INDEX 0
  517. #else // One stepper, E axis, and hotend per tool
  518. #define HOTENDS EXTRUDERS
  519. #define E_STEPPERS EXTRUDERS
  520. #define TOOL_E_INDEX current_block->active_extruder
  521. #endif
  522. /**
  523. * Default hotend offsets, if not defined
  524. */
  525. #if HOTENDS > 1
  526. #ifndef HOTEND_OFFSET_X
  527. #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
  528. #endif
  529. #ifndef HOTEND_OFFSET_Y
  530. #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
  531. #endif
  532. #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER))
  533. #define HOTEND_OFFSET_Z { 0 }
  534. #endif
  535. #endif
  536. /**
  537. * ARRAY_BY_EXTRUDERS based on EXTRUDERS
  538. */
  539. #define ARRAY_BY_EXTRUDERS(args...) ARRAY_N(EXTRUDERS, args)
  540. #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1)
  541. /**
  542. * ARRAY_BY_HOTENDS based on HOTENDS
  543. */
  544. #define ARRAY_BY_HOTENDS(args...) ARRAY_N(HOTENDS, args)
  545. #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
  546. /**
  547. * Z_DUAL_ENDSTOPS endstop reassignment
  548. */
  549. #if ENABLED(Z_DUAL_ENDSTOPS)
  550. #define _XMIN_ 100
  551. #define _YMIN_ 200
  552. #define _ZMIN_ 300
  553. #define _XMAX_ 101
  554. #define _YMAX_ 201
  555. #define _ZMAX_ 301
  556. #if Z2_USE_ENDSTOP == _XMAX_
  557. #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
  558. #define Z2_MAX_PIN X_MAX_PIN
  559. #undef USE_XMAX_PLUG
  560. #elif Z2_USE_ENDSTOP == _YMAX_
  561. #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
  562. #define Z2_MAX_PIN Y_MAX_PIN
  563. #undef USE_YMAX_PLUG
  564. #elif Z2_USE_ENDSTOP == _ZMAX_
  565. #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
  566. #define Z2_MAX_PIN Z_MAX_PIN
  567. #undef USE_ZMAX_PLUG
  568. #elif Z2_USE_ENDSTOP == _XMIN_
  569. #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
  570. #define Z2_MAX_PIN X_MIN_PIN
  571. #undef USE_XMIN_PLUG
  572. #elif Z2_USE_ENDSTOP == _YMIN_
  573. #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
  574. #define Z2_MAX_PIN Y_MIN_PIN
  575. #undef USE_YMIN_PLUG
  576. #elif Z2_USE_ENDSTOP == _ZMIN_
  577. #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
  578. #define Z2_MAX_PIN Z_MIN_PIN
  579. #undef USE_ZMIN_PLUG
  580. #else
  581. #define Z2_MAX_ENDSTOP_INVERTING false
  582. #endif
  583. #endif
  584. /**
  585. * Shorthand for pin tests, used wherever needed
  586. */
  587. #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2)
  588. #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
  589. #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
  590. #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
  591. #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
  592. #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
  593. #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
  594. #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
  595. #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
  596. #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
  597. #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN))
  598. #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN))
  599. #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN))
  600. #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN))
  601. #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
  602. #define HAS_FAN0 (PIN_EXISTS(FAN))
  603. #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN1_PIN)
  604. #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN2_PIN)
  605. #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
  606. #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
  607. #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
  608. #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
  609. #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
  610. #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
  611. #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
  612. #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT))
  613. #define HAS_HOME (PIN_EXISTS(HOME))
  614. #define HAS_KILL (PIN_EXISTS(KILL))
  615. #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
  616. #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
  617. #define HAS_X_MIN (PIN_EXISTS(X_MIN))
  618. #define HAS_X_MAX (PIN_EXISTS(X_MAX))
  619. #define HAS_Y_MIN (PIN_EXISTS(Y_MIN))
  620. #define HAS_Y_MAX (PIN_EXISTS(Y_MAX))
  621. #define HAS_Z_MIN (PIN_EXISTS(Z_MIN))
  622. #define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
  623. #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
  624. #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
  625. #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
  626. #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
  627. #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
  628. #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
  629. #define HAS_MICROSTEPS (PIN_EXISTS(X_MS1))
  630. #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
  631. #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
  632. #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
  633. #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
  634. #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
  635. #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
  636. #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
  637. #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
  638. #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
  639. #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
  640. #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
  641. #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
  642. #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
  643. #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
  644. #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
  645. #define HAS_X_DIR (PIN_EXISTS(X_DIR))
  646. #define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
  647. #define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
  648. #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
  649. #define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
  650. #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
  651. #define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
  652. #define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
  653. #define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
  654. #define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
  655. #define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
  656. #define HAS_X_STEP (PIN_EXISTS(X_STEP))
  657. #define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
  658. #define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
  659. #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
  660. #define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
  661. #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
  662. #define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
  663. #define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
  664. #define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
  665. #define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
  666. #define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
  667. #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
  668. #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
  669. #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED))
  670. /**
  671. * Helper Macros for heaters and extruder fan
  672. */
  673. #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
  674. #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
  675. #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v)
  676. #if HOTENDS > 2
  677. #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
  678. #if HOTENDS > 3
  679. #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
  680. #endif
  681. #endif
  682. #endif
  683. #if ENABLED(HEATERS_PARALLEL)
  684. #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
  685. #else
  686. #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
  687. #endif
  688. #if HAS_HEATER_BED
  689. #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
  690. #endif
  691. /**
  692. * Up to 3 PWM fans
  693. */
  694. #if HAS_FAN2
  695. #define FAN_COUNT 3
  696. #elif HAS_FAN1
  697. #define FAN_COUNT 2
  698. #elif HAS_FAN0
  699. #define FAN_COUNT 1
  700. #else
  701. #define FAN_COUNT 0
  702. #endif
  703. #if HAS_FAN0
  704. #define WRITE_FAN(v) WRITE(FAN_PIN, v)
  705. #define WRITE_FAN0(v) WRITE_FAN(v)
  706. #endif
  707. #if HAS_FAN1
  708. #define WRITE_FAN1(v) WRITE(FAN1_PIN, v)
  709. #endif
  710. #if HAS_FAN2
  711. #define WRITE_FAN2(v) WRITE(FAN2_PIN, v)
  712. #endif
  713. #define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
  714. #define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
  715. #if HAS_SERVOS
  716. #ifndef Z_ENDSTOP_SERVO_NR
  717. #define Z_ENDSTOP_SERVO_NR -1
  718. #endif
  719. #endif
  720. #define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
  721. #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
  722. #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED)
  723. #if ENABLED(Z_PROBE_ALLEN_KEY)
  724. #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
  725. #endif
  726. /**
  727. * Bed Probe dependencies
  728. */
  729. #if HAS_BED_PROBE
  730. #ifndef X_PROBE_OFFSET_FROM_EXTRUDER
  731. #define X_PROBE_OFFSET_FROM_EXTRUDER 0
  732. #endif
  733. #ifndef Y_PROBE_OFFSET_FROM_EXTRUDER
  734. #define Y_PROBE_OFFSET_FROM_EXTRUDER 0
  735. #endif
  736. #ifndef Z_PROBE_OFFSET_FROM_EXTRUDER
  737. #define Z_PROBE_OFFSET_FROM_EXTRUDER 0
  738. #endif
  739. #ifndef Z_PROBE_OFFSET_RANGE_MIN
  740. #define Z_PROBE_OFFSET_RANGE_MIN -20
  741. #endif
  742. #ifndef Z_PROBE_OFFSET_RANGE_MAX
  743. #define Z_PROBE_OFFSET_RANGE_MAX 20
  744. #endif
  745. #ifndef XY_PROBE_SPEED
  746. #ifdef HOMING_FEEDRATE_XYZ
  747. #define XY_PROBE_SPEED HOMING_FEEDRATE_XYZ
  748. #else
  749. #define XY_PROBE_SPEED 4000
  750. #endif
  751. #endif
  752. #if Z_RAISE_BETWEEN_PROBINGS > Z_RAISE_PROBE_DEPLOY_STOW
  753. #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_BETWEEN_PROBINGS
  754. #else
  755. #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_PROBE_DEPLOY_STOW
  756. #endif
  757. #endif
  758. /**
  759. * Delta radius/rod trimmers
  760. */
  761. #if ENABLED(DELTA)
  762. #ifndef DELTA_RADIUS_TRIM_TOWER_1
  763. #define DELTA_RADIUS_TRIM_TOWER_1 0.0
  764. #endif
  765. #ifndef DELTA_RADIUS_TRIM_TOWER_2
  766. #define DELTA_RADIUS_TRIM_TOWER_2 0.0
  767. #endif
  768. #ifndef DELTA_RADIUS_TRIM_TOWER_3
  769. #define DELTA_RADIUS_TRIM_TOWER_3 0.0
  770. #endif
  771. #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_1
  772. #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
  773. #endif
  774. #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_2
  775. #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
  776. #endif
  777. #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3
  778. #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
  779. #endif
  780. #if ENABLED(AUTO_BED_LEVELING_GRID)
  781. #define DELTA_BED_LEVELING_GRID
  782. #endif
  783. #endif
  784. /**
  785. * When not using other bed leveling...
  786. */
  787. #if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(AUTO_BED_LEVELING_GRID) && DISABLED(DELTA_BED_LEVELING_GRID)
  788. #define AUTO_BED_LEVELING_3POINT
  789. #endif
  790. /**
  791. * Buzzer/Speaker
  792. */
  793. #if ENABLED(LCD_USE_I2C_BUZZER)
  794. #ifndef LCD_FEEDBACK_FREQUENCY_HZ
  795. #define LCD_FEEDBACK_FREQUENCY_HZ 1000
  796. #endif
  797. #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
  798. #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
  799. #endif
  800. #elif PIN_EXISTS(BEEPER)
  801. #ifndef LCD_FEEDBACK_FREQUENCY_HZ
  802. #define LCD_FEEDBACK_FREQUENCY_HZ 5000
  803. #endif
  804. #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
  805. #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
  806. #endif
  807. #else
  808. #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
  809. #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
  810. #endif
  811. #endif
  812. /**
  813. * MIN_Z_HEIGHT_FOR_HOMING / Z_RAISE_BETWEEN_PROBINGS
  814. */
  815. #ifndef MIN_Z_HEIGHT_FOR_HOMING
  816. #ifndef Z_RAISE_BETWEEN_PROBINGS
  817. #define MIN_Z_HEIGHT_FOR_HOMING 0
  818. #else
  819. #define MIN_Z_HEIGHT_FOR_HOMING Z_RAISE_BETWEEN_PROBINGS
  820. #endif
  821. #endif
  822. #ifndef Z_RAISE_BETWEEN_PROBINGS
  823. #define Z_RAISE_BETWEEN_PROBING MIN_Z_HEIGHT_FOR_HOMING
  824. #endif
  825. #endif //CONFIGURATION_LCD
  826. #endif //CONDITIONALS_H