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

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