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_adv.h 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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_adv.h
  25. * Defines that depend on advanced configuration.
  26. */
  27. #if EXTRUDERS == 0
  28. #define NO_VOLUMETRICS
  29. #undef TEMP_SENSOR_0
  30. #undef TEMP_SENSOR_1
  31. #undef TEMP_SENSOR_2
  32. #undef TEMP_SENSOR_3
  33. #undef TEMP_SENSOR_4
  34. #undef TEMP_SENSOR_5
  35. #undef TEMP_SENSOR_6
  36. #undef TEMP_SENSOR_7
  37. #undef FWRETRACT
  38. #undef PIDTEMP
  39. #undef AUTOTEMP
  40. #undef PID_EXTRUSION_SCALING
  41. #undef LIN_ADVANCE
  42. #undef FILAMENT_RUNOUT_SENSOR
  43. #undef ADVANCED_PAUSE_FEATURE
  44. #undef FILAMENT_RUNOUT_DISTANCE_MM
  45. #undef FILAMENT_LOAD_UNLOAD_GCODES
  46. #undef DISABLE_INACTIVE_EXTRUDER
  47. #undef FILAMENT_LOAD_UNLOAD_GCODES
  48. #undef EXTRUDER_RUNOUT_PREVENT
  49. #undef PREVENT_COLD_EXTRUSION
  50. #undef PREVENT_LENGTHY_EXTRUDE
  51. #undef THERMAL_PROTECTION_HOTENDS
  52. #undef THERMAL_PROTECTION_PERIOD
  53. #undef WATCH_TEMP_PERIOD
  54. #undef SHOW_TEMP_ADC_VALUES
  55. #endif
  56. #if !NUM_SERIAL
  57. #undef BAUD_RATE_GCODE
  58. #endif
  59. // Multiple Z steppers
  60. #ifndef NUM_Z_STEPPER_DRIVERS
  61. #define NUM_Z_STEPPER_DRIVERS 1
  62. #endif
  63. #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
  64. #undef Z_STEPPER_ALIGN_AMP
  65. #endif
  66. #ifndef Z_STEPPER_ALIGN_AMP
  67. #define Z_STEPPER_ALIGN_AMP 1.0
  68. #endif
  69. #define HAS_CUTTER EITHER(SPINDLE_FEATURE, LASER_FEATURE)
  70. #if !defined(__AVR__) || !defined(USBCON)
  71. // Define constants and variables for buffering serial data.
  72. // Use only 0 or powers of 2 greater than 1
  73. // : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
  74. #ifndef RX_BUFFER_SIZE
  75. #define RX_BUFFER_SIZE 128
  76. #endif
  77. // 256 is the max TX buffer limit due to uint8_t head and tail
  78. // : [0, 4, 8, 16, 32, 64, 128, 256]
  79. #ifndef TX_BUFFER_SIZE
  80. #define TX_BUFFER_SIZE 32
  81. #endif
  82. #else
  83. // SERIAL_XON_XOFF not supported on USB-native devices
  84. #undef SERIAL_XON_XOFF
  85. #endif
  86. #if ENABLED(HOST_ACTION_COMMANDS)
  87. #ifndef ACTION_ON_PAUSE
  88. #define ACTION_ON_PAUSE "pause"
  89. #endif
  90. #ifndef ACTION_ON_PAUSED
  91. #define ACTION_ON_PAUSED "paused"
  92. #endif
  93. #ifndef ACTION_ON_RESUME
  94. #define ACTION_ON_RESUME "resume"
  95. #endif
  96. #ifndef ACTION_ON_RESUMED
  97. #define ACTION_ON_RESUMED "resumed"
  98. #endif
  99. #ifndef ACTION_ON_CANCEL
  100. #define ACTION_ON_CANCEL "cancel"
  101. #endif
  102. #ifndef ACTION_ON_KILL
  103. #define ACTION_ON_KILL "poweroff"
  104. #endif
  105. #if HAS_FILAMENT_SENSOR
  106. #ifndef ACTION_ON_FILAMENT_RUNOUT
  107. #define ACTION_ON_FILAMENT_RUNOUT "filament_runout"
  108. #endif
  109. #ifndef ACTION_REASON_ON_FILAMENT_RUNOUT
  110. #define ACTION_REASON_ON_FILAMENT_RUNOUT "filament_runout"
  111. #endif
  112. #endif
  113. #if ENABLED(G29_RETRY_AND_RECOVER)
  114. #ifndef ACTION_ON_G29_RECOVER
  115. #define ACTION_ON_G29_RECOVER "probe_rewipe"
  116. #endif
  117. #ifndef ACTION_ON_G29_FAILURE
  118. #define ACTION_ON_G29_FAILURE "probe_failed"
  119. #endif
  120. #endif
  121. #endif
  122. #if ENABLED(FYSETC_MINI_12864_2_1)
  123. #define LED_CONTROL_MENU
  124. #define LED_USER_PRESET_STARTUP
  125. #define LED_COLOR_PRESETS
  126. #ifndef LED_USER_PRESET_GREEN
  127. #define LED_USER_PRESET_GREEN 128
  128. #endif
  129. #ifndef LED_USER_PRESET_BLUE
  130. #define LED_USER_PRESET_BLUE 0
  131. #endif
  132. #ifndef LED_USER_PRESET_BRIGHTNESS
  133. #define LED_USER_PRESET_BRIGHTNESS 255
  134. #endif
  135. #endif
  136. // Set defaults for unspecified LED user colors
  137. #if ENABLED(LED_CONTROL_MENU)
  138. #ifndef LED_USER_PRESET_RED
  139. #define LED_USER_PRESET_RED 255
  140. #endif
  141. #ifndef LED_USER_PRESET_GREEN
  142. #define LED_USER_PRESET_GREEN 255
  143. #endif
  144. #ifndef LED_USER_PRESET_BLUE
  145. #define LED_USER_PRESET_BLUE 255
  146. #endif
  147. #ifndef LED_USER_PRESET_WHITE
  148. #define LED_USER_PRESET_WHITE 0
  149. #endif
  150. #ifndef LED_USER_PRESET_BRIGHTNESS
  151. #ifdef NEOPIXEL_BRIGHTNESS
  152. #define LED_USER_PRESET_BRIGHTNESS NEOPIXEL_BRIGHTNESS
  153. #else
  154. #define LED_USER_PRESET_BRIGHTNESS 255
  155. #endif
  156. #endif
  157. #endif
  158. // If platform requires early initialization of watchdog to properly boot
  159. #define EARLY_WATCHDOG (ENABLED(USE_WATCHDOG) && defined(ARDUINO_ARCH_SAM))
  160. // Extensible UI pin mapping for RepRapDiscount
  161. #define TOUCH_UI_ULTIPANEL ENABLED(TOUCH_UI_FTDI_EVE) && ANY(AO_EXP1_PINMAP, AO_EXP2_PINMAP, CR10_TFT_PINMAP)
  162. // Poll-based jogging for joystick and other devices
  163. #if ENABLED(JOYSTICK)
  164. #define POLL_JOG
  165. #endif
  166. /**
  167. * Driver Timings
  168. * NOTE: Driver timing order is longest-to-shortest duration.
  169. * Preserve this ordering when adding new drivers.
  170. */
  171. #ifndef MINIMUM_STEPPER_POST_DIR_DELAY
  172. #if HAS_DRIVER(TB6560)
  173. #define MINIMUM_STEPPER_POST_DIR_DELAY 15000
  174. #elif HAS_DRIVER(TB6600)
  175. #define MINIMUM_STEPPER_POST_DIR_DELAY 1500
  176. #elif HAS_DRIVER(DRV8825)
  177. #define MINIMUM_STEPPER_POST_DIR_DELAY 650
  178. #elif HAS_DRIVER(LV8729)
  179. #define MINIMUM_STEPPER_POST_DIR_DELAY 500
  180. #elif HAS_DRIVER(A5984)
  181. #define MINIMUM_STEPPER_POST_DIR_DELAY 400
  182. #elif HAS_DRIVER(A4988)
  183. #define MINIMUM_STEPPER_POST_DIR_DELAY 200
  184. #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE
  185. #define MINIMUM_STEPPER_POST_DIR_DELAY 20
  186. #else
  187. #define MINIMUM_STEPPER_POST_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
  188. #endif
  189. #endif
  190. #ifndef MINIMUM_STEPPER_PRE_DIR_DELAY
  191. #define MINIMUM_STEPPER_PRE_DIR_DELAY MINIMUM_STEPPER_POST_DIR_DELAY
  192. #endif
  193. #ifndef MINIMUM_STEPPER_PULSE
  194. #if HAS_DRIVER(TB6560)
  195. #define MINIMUM_STEPPER_PULSE 30
  196. #elif HAS_DRIVER(TB6600)
  197. #define MINIMUM_STEPPER_PULSE 3
  198. #elif HAS_DRIVER(DRV8825)
  199. #define MINIMUM_STEPPER_PULSE 2
  200. #elif HAS_DRIVER(A4988) || HAS_DRIVER(A5984)
  201. #define MINIMUM_STEPPER_PULSE 1
  202. #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE
  203. #define MINIMUM_STEPPER_PULSE 0
  204. #elif HAS_DRIVER(LV8729)
  205. #define MINIMUM_STEPPER_PULSE 0
  206. #else
  207. #define MINIMUM_STEPPER_PULSE 2
  208. #endif
  209. #endif
  210. #ifndef MAXIMUM_STEPPER_RATE
  211. #if HAS_DRIVER(TB6560)
  212. #define MAXIMUM_STEPPER_RATE 15000
  213. #elif HAS_DRIVER(TB6600)
  214. #define MAXIMUM_STEPPER_RATE 150000
  215. #elif HAS_DRIVER(DRV8825)
  216. #define MAXIMUM_STEPPER_RATE 250000
  217. #elif HAS_DRIVER(A4988)
  218. #define MAXIMUM_STEPPER_RATE 500000
  219. #elif HAS_DRIVER(LV8729)
  220. #define MAXIMUM_STEPPER_RATE 1000000
  221. #elif HAS_TRINAMIC || HAS_TRINAMIC_STANDALONE
  222. #define MAXIMUM_STEPPER_RATE 5000000
  223. #else
  224. #define MAXIMUM_STEPPER_RATE 250000
  225. #endif
  226. #endif