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.

SanityCheck.h 71KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703
  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. * SanityCheck.h
  24. *
  25. * Test configuration values for errors at compile-time.
  26. */
  27. #ifndef _SANITYCHECK_H_
  28. #define _SANITYCHECK_H_
  29. /**
  30. * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features.
  31. */
  32. #if __cplusplus < 201103L
  33. #error "Marlin requires C++11 support (gcc >= 4.7, Arduino IDE >= 1.6.8). Please upgrade your toolchain."
  34. #endif
  35. /**
  36. * We try our best to include sanity checks for all changed configuration
  37. * directives because users have a tendency to use outdated config files with
  38. * the bleeding-edge source code, but sometimes this is not enough. This check
  39. * forces a minimum config file revision. Otherwise Marlin will not build.
  40. */
  41. #if !defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION
  42. #error "You are using an old Configuration.h file, update it before building Marlin."
  43. #endif
  44. #if !defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION
  45. #error "You are using an old Configuration_adv.h file, update it before building Marlin."
  46. #endif
  47. /**
  48. * Warnings for old configurations
  49. */
  50. #if !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
  51. #error "X_BED_SIZE and Y_BED_SIZE are now required! Please update your configuration."
  52. #elif WATCH_TEMP_PERIOD > 500
  53. #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
  54. #elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
  55. #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS."
  56. #elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD)
  57. #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED."
  58. #elif (CORE_IS_XZ || CORE_IS_YZ) && ENABLED(Z_LATE_ENABLE)
  59. #error "Z_LATE_ENABLE can't be used with COREXZ, COREZX, COREYZ, or COREZY."
  60. #elif defined(X_HOME_RETRACT_MM)
  61. #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
  62. #elif defined(SDCARDDETECTINVERTED)
  63. #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
  64. #elif defined(BTENABLED)
  65. #error "BTENABLED is now BLUETOOTH. Please update your configuration."
  66. #elif defined(CUSTOM_MENDEL_NAME)
  67. #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration."
  68. #elif defined(HAS_AUTOMATIC_VERSIONING)
  69. #error "HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration."
  70. #elif defined(SDSLOW)
  71. #error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead."
  72. #elif defined(SDEXTRASLOW)
  73. #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead."
  74. #elif defined(FILAMENT_SENSOR)
  75. #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR. Please update your configuration."
  76. #elif defined(ENDSTOPPULLUP_FIL_RUNOUT)
  77. #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP. Please update your configuration."
  78. #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
  79. #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead."
  80. #elif defined(LANGUAGE_INCLUDE)
  81. #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration."
  82. #elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y)
  83. #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead."
  84. #elif defined(PID_PARAMS_PER_EXTRUDER)
  85. #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead."
  86. #elif defined(EXTRUDER_WATTS) || defined(BED_WATTS)
  87. #error "EXTRUDER_WATTS and BED_WATTS are deprecated. Remove them from your configuration."
  88. #elif defined(SERVO_ENDSTOP_ANGLES)
  89. #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
  90. #elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
  91. #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
  92. #elif defined(Z_ENDSTOP_SERVO_NR)
  93. #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR. Please update your configuration."
  94. #elif defined(DEFAULT_XYJERK)
  95. #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead."
  96. #elif ENABLED(BEZIER_JERK_CONTROL) && !defined(CPU_32_BIT)
  97. #error "BEZIER_JERK_CONTROL is computationally intensive and requires a 32-bit board."
  98. #elif defined(XY_TRAVEL_SPEED)
  99. #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
  100. #elif defined(PROBE_SERVO_DEACTIVATION_DELAY)
  101. #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead."
  102. #elif defined(SERVO_DEACTIVATION_DELAY)
  103. #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead."
  104. #elif ENABLED(FILAMENTCHANGEENABLE)
  105. #error "FILAMENTCHANGEENABLE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
  106. #elif ENABLED(FILAMENT_CHANGE_FEATURE)
  107. #error "FILAMENT_CHANGE_FEATURE is now ADVANCED_PAUSE_FEATURE. Please update your configuration."
  108. #elif defined(FILAMENT_CHANGE_X_POS) || defined(FILAMENT_CHANGE_Y_POS)
  109. #error "FILAMENT_CHANGE_[XY]_POS is now set with NOZZLE_PARK_POINT. Please update your configuration."
  110. #elif defined(FILAMENT_CHANGE_Z_ADD)
  111. #error "FILAMENT_CHANGE_Z_ADD is now set with NOZZLE_PARK_POINT. Please update your configuration."
  112. #elif defined(FILAMENT_CHANGE_XY_FEEDRATE)
  113. #error "FILAMENT_CHANGE_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE. Please update your configuration."
  114. #elif defined(FILAMENT_CHANGE_Z_FEEDRATE)
  115. #error "FILAMENT_CHANGE_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE. Please update your configuration."
  116. #elif defined(PAUSE_PARK_X_POS) || defined(PAUSE_PARK_Y_POS)
  117. #error "PAUSE_PARK_[XY]_POS is now set with NOZZLE_PARK_POINT. Please update your configuration."
  118. #elif defined(PAUSE_PARK_Z_ADD)
  119. #error "PAUSE_PARK_Z_ADD is now set with NOZZLE_PARK_POINT. Please update your configuration."
  120. #elif defined(PAUSE_PARK_XY_FEEDRATE)
  121. #error "PAUSE_PARK_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE. Please update your configuration."
  122. #elif defined(PAUSE_PARK_Z_FEEDRATE)
  123. #error "PAUSE_PARK_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE. Please update your configuration."
  124. #elif defined(FILAMENT_CHANGE_RETRACT_FEEDRATE)
  125. #error "FILAMENT_CHANGE_RETRACT_FEEDRATE is now PAUSE_PARK_RETRACT_FEEDRATE. Please update your configuration."
  126. #elif defined(FILAMENT_CHANGE_RETRACT_LENGTH)
  127. #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
  128. #elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
  129. #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
  130. #elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE)
  131. #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
  132. #elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
  133. #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
  134. #elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH)
  135. #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
  136. #elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
  137. #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
  138. #elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
  139. #error "FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS is now FILAMENT_CHANGE_ALERT_BEEPS. Please update your configuration."
  140. #elif ENABLED(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT)
  141. #error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT. Please update your configuration."
  142. #elif defined(PLA_PREHEAT_HOTEND_TEMP)
  143. #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration."
  144. #elif defined(PLA_PREHEAT_HPB_TEMP)
  145. #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED. Please update your configuration."
  146. #elif defined(PLA_PREHEAT_FAN_SPEED)
  147. #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED. Please update your configuration."
  148. #elif defined(ABS_PREHEAT_HOTEND_TEMP)
  149. #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND. Please update your configuration."
  150. #elif defined(ABS_PREHEAT_HPB_TEMP)
  151. #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED. Please update your configuration."
  152. #elif defined(ABS_PREHEAT_FAN_SPEED)
  153. #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED. Please update your configuration."
  154. #elif defined(ENDSTOPS_ONLY_FOR_HOMING)
  155. #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead."
  156. #elif defined(HOMING_FEEDRATE)
  157. #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead."
  158. #elif defined(MANUAL_HOME_POSITIONS)
  159. #error "MANUAL_HOME_POSITIONS is deprecated. Set MANUAL_[XYZ]_HOME_POS as-needed instead."
  160. #elif defined(PID_ADD_EXTRUSION_RATE)
  161. #error "PID_ADD_EXTRUSION_RATE is now PID_EXTRUSION_SCALING and is DISABLED by default. Are you sure you want to use this option? Please update your configuration."
  162. #elif defined(Z_RAISE_BEFORE_HOMING)
  163. #error "Z_RAISE_BEFORE_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
  164. #elif defined(MIN_Z_HEIGHT_FOR_HOMING)
  165. #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
  166. #elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
  167. #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead."
  168. #elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS)
  169. #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
  170. #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
  171. #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
  172. #elif defined(MANUAL_BED_LEVELING)
  173. #error "MANUAL_BED_LEVELING is now LCD_BED_LEVELING. Please update your configuration."
  174. #elif defined(MESH_HOME_SEARCH_Z)
  175. #error "MESH_HOME_SEARCH_Z is now LCD_PROBE_Z_RANGE. Please update your configuration."
  176. #elif defined(MANUAL_PROBE_Z_RANGE)
  177. #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE. Please update your configuration."
  178. #elif !defined(MIN_STEPS_PER_SEGMENT)
  179. #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
  180. #elif defined(PREVENT_DANGEROUS_EXTRUDE)
  181. #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION. Please update your configuration."
  182. #elif defined(SCARA)
  183. #error "SCARA is now MORGAN_SCARA. Please update your configuration."
  184. #elif defined(ENABLE_AUTO_BED_LEVELING)
  185. #error "ENABLE_AUTO_BED_LEVELING is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
  186. #elif defined(AUTO_BED_LEVELING_FEATURE)
  187. #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT."
  188. #elif defined(ABL_GRID_POINTS)
  189. #error "ABL_GRID_POINTS is now GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y. Please update your configuration."
  190. #elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y)
  191. #error "ABL_GRID_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  192. #elif defined(ABL_GRID_MAX_POINTS_X) || defined(ABL_GRID_MAX_POINTS_Y)
  193. #error "ABL_GRID_MAX_POINTS_[XY] is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  194. #elif defined(MESH_NUM_X_POINTS) || defined(MESH_NUM_Y_POINTS)
  195. #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  196. #elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS)
  197. #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]. Please update your configuration."
  198. #elif defined(UBL_G26_MESH_VALIDATION)
  199. #error "UBL_G26_MESH_VALIDATION is now G26_MESH_VALIDATION. Please update your configuration."
  200. #elif defined(UBL_MESH_EDIT_ENABLED)
  201. #error "UBL_MESH_EDIT_ENABLED is now G26_MESH_VALIDATION. Please update your configuration."
  202. #elif defined(UBL_MESH_EDITING)
  203. #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION. Please update your configuration."
  204. #elif defined(BLTOUCH_HEATERS_OFF)
  205. #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration."
  206. #elif defined(BEEPER)
  207. #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
  208. #elif defined(SDCARDDETECT)
  209. #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
  210. #elif defined(STAT_LED_RED) || defined(STAT_LED_BLUE)
  211. #error "STAT_LED_RED/STAT_LED_BLUE are now STAT_LED_RED_PIN/STAT_LED_BLUE_PIN. Please update your pins definitions."
  212. #elif defined(LCD_PIN_BL)
  213. #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
  214. #elif defined(LCD_PIN_RESET)
  215. #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
  216. #elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
  217. #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
  218. #elif defined(min_software_endstops) || defined(max_software_endstops)
  219. #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
  220. #elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
  221. #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
  222. #elif defined(CONTROLLERFAN_PIN)
  223. #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
  224. #elif defined(MIN_RETRACT)
  225. #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
  226. #elif defined(ADVANCE)
  227. #error "ADVANCE was removed in Marlin 1.1.6. Please use LIN_ADVANCE."
  228. #elif defined(LIN_ADVANCE_E_D_RATIO)
  229. #error "LIN_ADVANCE (1.5) no longer uses LIN_ADVANCE_E_D_RATIO. Check your configuration."
  230. #elif defined(NEOPIXEL_RGBW_LED)
  231. #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED. Please update your configuration."
  232. #elif ENABLED(DELTA) && defined(DELTA_PROBEABLE_RADIUS)
  233. #error "Remove DELTA_PROBEABLE_RADIUS and use MIN_PROBE_EDGE to inset the probe area instead."
  234. #elif defined(UBL_MESH_INSET)
  235. #error "UBL_MESH_INSET is now just MESH_INSET. Please update your configuration."
  236. #elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y)
  237. #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]. Please update your configuration."
  238. #elif defined(ABL_PROBE_PT_1_X) || defined(ABL_PROBE_PT_1_Y) || defined(ABL_PROBE_PT_2_X) || defined(ABL_PROBE_PT_2_Y) || defined(ABL_PROBE_PT_3_X) || defined(ABL_PROBE_PT_3_Y)
  239. #error "ABL_PROBE_PT_[123]_[XY] is now PROBE_PT_[123]_[XY]. Please update your configuration."
  240. #elif defined(UBL_PROBE_PT_1_X) || defined(UBL_PROBE_PT_1_Y) || defined(UBL_PROBE_PT_2_X) || defined(UBL_PROBE_PT_2_Y) || defined(UBL_PROBE_PT_3_X) || defined(UBL_PROBE_PT_3_Y)
  241. #error "UBL_PROBE_PT_[123]_[XY] is now PROBE_PT_[123]_[XY]. Please update your configuration."
  242. #elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY)
  243. #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY. Please update your configuration."
  244. #elif defined(BABYSTEP_ZPROBE_GFX_REVERSE)
  245. #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE. Please update your configurations."
  246. #elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)
  247. #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES. Please update your configuration."
  248. #elif HAS_PID_HEATING && (defined(K1) || !defined(PID_K1))
  249. #error "K1 is now PID_K1. Please update your configuration."
  250. #elif defined(PROBE_DOUBLE_TOUCH)
  251. #error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING. Please update your configuration."
  252. #elif defined(ANET_KEYPAD_LCD)
  253. #error "ANET_KEYPAD_LCD is now ZONESTAR_LCD. Please update your configuration."
  254. #elif defined(LCD_I2C_SAINSMART_YWROBOT)
  255. #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004). Please update your configuration."
  256. #elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT)
  257. #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration."
  258. #elif defined(HAVE_TMCDRIVER)
  259. #error "HAVE_TMCDRIVER is now HAVE_TMC26X. Please update your Configuration_adv.h."
  260. #elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) \
  261. || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC)
  262. #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h."
  263. #elif defined(AUTOMATIC_CURRENT_CONTROL)
  264. #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
  265. #elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
  266. #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration."
  267. #endif
  268. /**
  269. * Marlin release, version and default string
  270. */
  271. #ifndef SHORT_BUILD_VERSION
  272. #error "SHORT_BUILD_VERSION must be specified."
  273. #elif !defined(DETAILED_BUILD_VERSION)
  274. #error "BUILD_VERSION must be specified."
  275. #elif !defined(STRING_DISTRIBUTION_DATE)
  276. #error "STRING_DISTRIBUTION_DATE must be specified."
  277. #elif !defined(PROTOCOL_VERSION)
  278. #error "PROTOCOL_VERSION must be specified."
  279. #elif !defined(MACHINE_NAME)
  280. #error "MACHINE_NAME must be specified."
  281. #elif !defined(SOURCE_CODE_URL)
  282. #error "SOURCE_CODE_URL must be specified."
  283. #elif !defined(DEFAULT_MACHINE_UUID)
  284. #error "DEFAULT_MACHINE_UUID must be specified."
  285. #elif !defined(WEBSITE_URL)
  286. #error "WEBSITE_URL must be specified."
  287. #endif
  288. /**
  289. * Serial
  290. */
  291. #if !(defined(__AVR__) && defined(USBCON))
  292. #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
  293. #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
  294. #elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
  295. #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
  296. #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
  297. #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
  298. #endif
  299. #elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX)
  300. #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
  301. #endif
  302. #if SERIAL_PORT > 7
  303. #error "Set SERIAL_PORT to the port on your board. Usually this is 0."
  304. #endif
  305. /**
  306. * Dual Stepper Drivers
  307. */
  308. #if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
  309. #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
  310. #elif ENABLED(X_DUAL_STEPPER_DRIVERS) && (!HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR)
  311. #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
  312. #elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && (!HAS_Y2_ENABLE || !HAS_Y2_STEP || !HAS_Y2_DIR)
  313. #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)."
  314. #elif ENABLED(Z_DUAL_STEPPER_DRIVERS) && (!HAS_Z2_ENABLE || !HAS_Z2_STEP || !HAS_Z2_DIR)
  315. #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."
  316. #endif
  317. /**
  318. * Validate that the bed size fits
  319. */
  320. static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
  321. "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE.");
  322. /**
  323. * Granular software endstops (Marlin >= 1.1.7)
  324. */
  325. #if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
  326. #if IS_KINEMATIC
  327. #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
  328. #elif DISABLED(MIN_SOFTWARE_ENDSTOP_X) && DISABLED(MIN_SOFTWARE_ENDSTOP_Y)
  329. #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options."
  330. #endif
  331. #endif
  332. #if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
  333. #if IS_KINEMATIC
  334. #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
  335. #elif DISABLED(MAX_SOFTWARE_ENDSTOP_X) && DISABLED(MAX_SOFTWARE_ENDSTOP_Y)
  336. #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options."
  337. #endif
  338. #endif
  339. #if !defined(TARGET_LPC1768) && ( \
  340. ENABLED(ENDSTOPPULLDOWNS) \
  341. || ENABLED(ENDSTOPPULLDOWN_XMAX) \
  342. || ENABLED(ENDSTOPPULLDOWN_YMAX) \
  343. || ENABLED(ENDSTOPPULLDOWN_ZMAX) \
  344. || ENABLED(ENDSTOPPULLDOWN_XMIN) \
  345. || ENABLED(ENDSTOPPULLDOWN_YMIN) \
  346. || ENABLED(ENDSTOPPULLDOWN_ZMIN) )
  347. #error "PULLDOWN pin mode is not available on the selected board."
  348. #endif
  349. #if ENABLED(ENDSTOPPULLUPS) && ENABLED(ENDSTOPPULLDOWNS)
  350. #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS."
  351. #elif ENABLED(FIL_RUNOUT_PULLUP) && ENABLED(FIL_RUNOUT_PULLDOWN)
  352. #error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN."
  353. #elif ENABLED(ENDSTOPPULLUP_XMAX) && ENABLED(ENDSTOPPULLDOWN_XMAX)
  354. #error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX."
  355. #elif ENABLED(ENDSTOPPULLUP_YMAX) && ENABLED(ENDSTOPPULLDOWN_YMAX)
  356. #error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX."
  357. #elif ENABLED(ENDSTOPPULLUP_ZMAX) && ENABLED(ENDSTOPPULLDOWN_ZMAX)
  358. #error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX."
  359. #elif ENABLED(ENDSTOPPULLUP_XMIN) && ENABLED(ENDSTOPPULLDOWN_XMIN)
  360. #error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN."
  361. #elif ENABLED(ENDSTOPPULLUP_YMIN) && ENABLED(ENDSTOPPULLDOWN_YMIN)
  362. #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN."
  363. #elif ENABLED(ENDSTOPPULLUP_ZMIN) && ENABLED(ENDSTOPPULLDOWN_ZMIN)
  364. #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN."
  365. #endif
  366. /**
  367. * Progress Bar
  368. */
  369. #if ENABLED(LCD_PROGRESS_BAR)
  370. #if DISABLED(SDSUPPORT) && DISABLED(LCD_SET_PROGRESS_MANUALLY)
  371. #error "LCD_PROGRESS_BAR requires SDSUPPORT or LCD_SET_PROGRESS_MANUALLY."
  372. #elif DISABLED(ULTRA_LCD)
  373. #error "LCD_PROGRESS_BAR requires a character LCD."
  374. #elif ENABLED(DOGLCD)
  375. #error "LCD_PROGRESS_BAR does not apply to graphical displays."
  376. #elif ENABLED(FILAMENT_LCD_DISPLAY)
  377. #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both."
  378. #endif
  379. #elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && DISABLED(DOGLCD)
  380. #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR or Graphical LCD."
  381. #endif
  382. /**
  383. * Custom Boot and Status screens
  384. */
  385. #if DISABLED(DOGLCD) && (ENABLED(SHOW_CUSTOM_BOOTSCREEN) || ENABLED(CUSTOM_STATUS_SCREEN_IMAGE))
  386. #error "Graphical LCD is required for SHOW_CUSTOM_BOOTSCREEN and CUSTOM_STATUS_SCREEN_IMAGE."
  387. #endif
  388. /**
  389. * SD File Sorting
  390. */
  391. #if ENABLED(SDCARD_SORT_ALPHA)
  392. #if SDSORT_LIMIT > 256
  393. #error "SDSORT_LIMIT must be 256 or smaller."
  394. #elif SDSORT_LIMIT < 10
  395. #error "SDSORT_LIMIT should be greater than 9 to be useful."
  396. #elif DISABLED(SDSORT_USES_RAM)
  397. #if ENABLED(SDSORT_DYNAMIC_RAM)
  398. #error "SDSORT_DYNAMIC_RAM requires SDSORT_USES_RAM (which reads the directory into RAM)."
  399. #elif ENABLED(SDSORT_CACHE_NAMES)
  400. #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
  401. #endif
  402. #endif
  403. #if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
  404. #if SDSORT_CACHE_VFATS < 2
  405. #error "SDSORT_CACHE_VFATS must be 2 or greater!"
  406. #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES
  407. #undef SDSORT_CACHE_VFATS
  408. #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES
  409. #warning "SDSORT_CACHE_VFATS was reduced to MAX_VFAT_ENTRIES!"
  410. #endif
  411. #endif
  412. #endif
  413. /**
  414. * I2C Position Encoders
  415. */
  416. #if ENABLED(I2C_POSITION_ENCODERS)
  417. #if DISABLED(BABYSTEPPING) || DISABLED(BABYSTEP_XY)
  418. #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY."
  419. #elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5)
  420. #error "I2CPE_ENCODER_CNT must be between 1 and 5."
  421. #endif
  422. #endif
  423. /**
  424. * Babystepping
  425. */
  426. #if ENABLED(BABYSTEPPING)
  427. #if ENABLED(SCARA)
  428. #error "BABYSTEPPING is not implemented for SCARA yet."
  429. #elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
  430. #error "BABYSTEPPING only implemented for Z axis on deltabots."
  431. #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && ENABLED(MESH_BED_LEVELING)
  432. #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination"
  433. #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
  434. #error "BABYSTEP_ZPROBE_OFFSET requires a probe."
  435. #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(DOGLCD)
  436. #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a DOGLCD."
  437. #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !ENABLED(BABYSTEP_ZPROBE_OFFSET)
  438. #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
  439. #endif
  440. #endif
  441. /**
  442. * Filament Runout needs one or more pins and either SD Support or Auto print start detection
  443. */
  444. #if ENABLED(FILAMENT_RUNOUT_SENSOR)
  445. #if !PIN_EXISTS(FIL_RUNOUT)
  446. #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN."
  447. #elif NUM_RUNOUT_SENSORS > E_STEPPERS
  448. #error "NUM_RUNOUT_SENSORS cannot exceed the number of E steppers."
  449. #elif NUM_RUNOUT_SENSORS > 1 && !PIN_EXISTS(FIL_RUNOUT2)
  450. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 1 requires FIL_RUNOUT2_PIN."
  451. #elif NUM_RUNOUT_SENSORS > 2 && !PIN_EXISTS(FIL_RUNOUT3)
  452. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 2 requires FIL_RUNOUT3_PIN."
  453. #elif NUM_RUNOUT_SENSORS > 3 && !PIN_EXISTS(FIL_RUNOUT4)
  454. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 3 requires FIL_RUNOUT4_PIN."
  455. #elif NUM_RUNOUT_SENSORS > 4 && !PIN_EXISTS(FIL_RUNOUT5)
  456. #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 4 requires FIL_RUNOUT5_PIN."
  457. #elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART)
  458. #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART."
  459. #elif DISABLED(ADVANCED_PAUSE_FEATURE)
  460. static_assert(NULL == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
  461. #endif
  462. #endif
  463. /**
  464. * Advanced Pause
  465. */
  466. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  467. #if !HAS_RESUME_CONTINUE
  468. #error "ADVANCED_PAUSE_FEATURE currently requires an LCD controller or EMERGENCY_PARSER."
  469. #elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
  470. #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
  471. #elif ENABLED(PARK_HEAD_ON_PAUSE) && DISABLED(SDSUPPORT) && DISABLED(NEWPANEL) && DISABLED(EMERGENCY_PARSER)
  472. #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
  473. #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
  474. #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT."
  475. #elif DISABLED(NOZZLE_PARK_FEATURE)
  476. #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
  477. #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
  478. #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
  479. #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH
  480. #error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
  481. #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH
  482. #error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
  483. #endif
  484. #endif
  485. /**
  486. * Individual axis homing is useless for DELTAS
  487. */
  488. #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA)
  489. #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
  490. #endif
  491. /**
  492. * Options only for EXTRUDERS > 1
  493. */
  494. #if EXTRUDERS > 1
  495. #if EXTRUDERS > 5
  496. #error "Marlin supports a maximum of 5 EXTRUDERS."
  497. #endif
  498. #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
  499. #error "EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT."
  500. #endif
  501. #if ENABLED(HEATERS_PARALLEL)
  502. #error "EXTRUDERS must be 1 with HEATERS_PARALLEL."
  503. #endif
  504. #elif ENABLED(MK2_MULTIPLEXER)
  505. #error "MK2_MULTIPLEXER requires 2 or more EXTRUDERS."
  506. #elif ENABLED(SINGLENOZZLE)
  507. #error "SINGLENOZZLE requires 2 or more EXTRUDERS."
  508. #endif
  509. /**
  510. * Sanity checking for the Průša MK2 Multiplexer
  511. */
  512. #ifdef SNMM
  513. #error "SNMM is now MK2_MULTIPLEXER. Please update your configuration."
  514. #endif
  515. /**
  516. * A Dual Nozzle carriage with switching servo
  517. */
  518. #if ENABLED(SWITCHING_NOZZLE)
  519. #if ENABLED(DUAL_X_CARRIAGE)
  520. #error "SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
  521. #elif ENABLED(SINGLENOZZLE)
  522. #error "SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
  523. #elif EXTRUDERS != 2
  524. #error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
  525. #elif NUM_SERVOS < 1
  526. #error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
  527. #endif
  528. #endif
  529. /**
  530. * Single Stepper Dual Extruder with switching servo
  531. */
  532. #if ENABLED(SWITCHING_EXTRUDER) && NUM_SERVOS < 1
  533. #error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
  534. #endif
  535. /**
  536. * Mixing Extruder requirements
  537. */
  538. #if ENABLED(MIXING_EXTRUDER)
  539. #if EXTRUDERS > 1
  540. #error "MIXING_EXTRUDER currently only supports one extruder."
  541. #elif MIXING_STEPPERS < 2
  542. #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
  543. #elif ENABLED(FILAMENT_SENSOR)
  544. #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway."
  545. #elif ENABLED(SWITCHING_EXTRUDER)
  546. #error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both."
  547. #elif ENABLED(SINGLENOZZLE)
  548. #error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE."
  549. #elif ENABLED(LIN_ADVANCE)
  550. #error "MIXING_EXTRUDER is incompatible with LIN_ADVANCE."
  551. #endif
  552. #endif
  553. /**
  554. * Linear Advance 1.5 - Check K value range
  555. */
  556. #if ENABLED(LIN_ADVANCE)
  557. static_assert(
  558. WITHIN(LIN_ADVANCE_K, 0, 10),
  559. "LIN_ADVANCE_K must be a value from 0 to 10 (Changed in LIN_ADVANCE v1.5, Marlin 1.1.9)."
  560. );
  561. #endif
  562. /**
  563. * Parking Extruder requirements
  564. */
  565. #if ENABLED(PARKING_EXTRUDER)
  566. #if ENABLED(DUAL_X_CARRIAGE)
  567. #error "PARKING_EXTRUDER and DUAL_X_CARRIAGE are incompatible."
  568. #elif ENABLED(SINGLENOZZLE)
  569. #error "PARKING_EXTRUDER and SINGLENOZZLE are incompatible."
  570. #elif ENABLED(EXT_SOLENOID)
  571. #error "PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)"
  572. #elif EXTRUDERS != 2
  573. #error "PARKING_EXTRUDER requires exactly 2 EXTRUDERS."
  574. #elif !PIN_EXISTS(SOL0) || !PIN_EXISTS(SOL1)
  575. #error "PARKING_EXTRUDER requires SOL0_PIN and SOL1_PIN."
  576. #elif !defined(PARKING_EXTRUDER_PARKING_X)
  577. #error "PARKING_EXTRUDER requires PARKING_EXTRUDER_PARKING_X."
  578. #elif !defined(PARKING_EXTRUDER_SECURITY_RAISE)
  579. #error "PARKING_EXTRUDER requires PARKING_EXTRUDER_SECURITY_RAISE."
  580. #elif PARKING_EXTRUDER_SECURITY_RAISE < 0
  581. #error "PARKING_EXTRUDER_SECURITY_RAISE must be 0 or higher."
  582. #elif !defined(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE, LOW, HIGH)
  583. #error "PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE must be defined as HIGH or LOW."
  584. #elif !defined(PARKING_EXTRUDER_SOLENOIDS_DELAY) || !WITHIN(PARKING_EXTRUDER_SOLENOIDS_DELAY, 0, 2000)
  585. #error "PARKING_EXTRUDER_SOLENOIDS_DELAY must be between 0 and 2000 (ms)."
  586. #endif
  587. #endif
  588. /**
  589. * Part-Cooling Fan Multiplexer requirements
  590. */
  591. #if PIN_EXISTS(FANMUX1)
  592. #if !HAS_FANMUX
  593. #error "FANMUX0_PIN must be set before FANMUX1_PIN can be set."
  594. #endif
  595. #elif PIN_EXISTS(FANMUX2)
  596. #error "FANMUX0_PIN and FANMUX1_PIN must be set before FANMUX2_PIN can be set."
  597. #endif
  598. /**
  599. * Limited number of servos
  600. */
  601. #if NUM_SERVOS > 4
  602. #error "The maximum number of SERVOS in Marlin is 4."
  603. #endif
  604. /**
  605. * Servo deactivation depends on servo endstops, switching nozzle, or switching extruder
  606. */
  607. #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_PROBE && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR)
  608. #error "Z_PROBE_SERVO_NR, switching nozzle, or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE."
  609. #endif
  610. /**
  611. * Required LCD language
  612. */
  613. #if DISABLED(DOGLCD) && ENABLED(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780)
  614. #error "You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller."
  615. #endif
  616. /**
  617. * Bed Heating Options - PID vs Limit Switching
  618. */
  619. #if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
  620. #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
  621. #endif
  622. /**
  623. * Kinematics
  624. */
  625. /**
  626. * Allow only one kinematic type to be defined
  627. */
  628. #if 1 < 0 \
  629. + ENABLED(DELTA) \
  630. + ENABLED(MORGAN_SCARA) \
  631. + ENABLED(MAKERARM_SCARA) \
  632. + ENABLED(COREXY) \
  633. + ENABLED(COREXZ) \
  634. + ENABLED(COREYZ) \
  635. + ENABLED(COREYX) \
  636. + ENABLED(COREZX) \
  637. + ENABLED(COREZY)
  638. #error "Please enable only one of DELTA, MORGAN_SCARA, MAKERARM_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, or COREZY."
  639. #endif
  640. /**
  641. * Delta requirements
  642. */
  643. #if ENABLED(DELTA)
  644. #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
  645. #error "You probably want to use Max Endstops for DELTA!"
  646. #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
  647. #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
  648. #elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || ENABLED(ULTIPANEL))
  649. #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller."
  650. #elif ABL_GRID
  651. #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
  652. #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
  653. #elif GRID_MAX_POINTS_X < 3
  654. #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher."
  655. #endif
  656. #endif
  657. #endif
  658. /**
  659. * Probes
  660. */
  661. /**
  662. * Allow only one probe option to be defined
  663. */
  664. #if 1 < 0 \
  665. + ENABLED(PROBE_MANUALLY) \
  666. + ENABLED(FIX_MOUNTED_PROBE) \
  667. + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \
  668. + ENABLED(BLTOUCH) \
  669. + ENABLED(SOLENOID_PROBE) \
  670. + ENABLED(Z_PROBE_ALLEN_KEY) \
  671. + ENABLED(Z_PROBE_SLED)
  672. #error "Please enable only one probe option: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
  673. #endif
  674. #if HAS_BED_PROBE
  675. /**
  676. * Z_PROBE_SLED is incompatible with DELTA
  677. */
  678. #if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA)
  679. #error "You cannot use Z_PROBE_SLED with DELTA."
  680. #endif
  681. /**
  682. * SOLENOID_PROBE requirements
  683. */
  684. #if ENABLED(SOLENOID_PROBE)
  685. #if ENABLED(EXT_SOLENOID)
  686. #error "SOLENOID_PROBE is incompatible with EXT_SOLENOID."
  687. #elif !HAS_SOLENOID_1
  688. #error "SOLENOID_PROBE requires SOL1_PIN. It can be added to your Configuration.h."
  689. #endif
  690. #endif
  691. /**
  692. * NUM_SERVOS is required for a Z servo probe
  693. */
  694. #if HAS_Z_SERVO_PROBE
  695. #ifndef NUM_SERVOS
  696. #error "You must set NUM_SERVOS for a Z servo probe (Z_PROBE_SERVO_NR)."
  697. #elif Z_PROBE_SERVO_NR >= NUM_SERVOS
  698. #error "Z_PROBE_SERVO_NR must be smaller than NUM_SERVOS."
  699. #endif
  700. #endif
  701. /**
  702. * Require pin options and pins to be defined
  703. */
  704. #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  705. #if ENABLED(Z_MIN_PROBE_ENDSTOP)
  706. #error "Enable only one option: Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN."
  707. #elif DISABLED(USE_ZMIN_PLUG)
  708. #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires USE_ZMIN_PLUG to be enabled."
  709. #elif !HAS_Z_MIN
  710. #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined."
  711. #elif ENABLED(Z_MIN_PROBE_ENDSTOP_INVERTING) != ENABLED(Z_MIN_ENDSTOP_INVERTING)
  712. #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_INVERTING to match Z_MIN_PROBE_ENDSTOP_INVERTING."
  713. #endif
  714. #elif ENABLED(Z_MIN_PROBE_ENDSTOP)
  715. #if !HAS_Z_MIN_PROBE_PIN
  716. #error "Z_MIN_PROBE_ENDSTOP requires the Z_MIN_PROBE_PIN to be defined."
  717. #endif
  718. #else
  719. #error "You must enable either Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use a probe."
  720. #endif
  721. /**
  722. * Make sure Z raise values are set
  723. */
  724. #ifndef Z_CLEARANCE_DEPLOY_PROBE
  725. #error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
  726. #elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
  727. #error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."
  728. #elif Z_CLEARANCE_DEPLOY_PROBE < 0
  729. #error "Probes need Z_CLEARANCE_DEPLOY_PROBE >= 0."
  730. #elif Z_CLEARANCE_BETWEEN_PROBES < 0
  731. #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
  732. #elif Z_AFTER_PROBING < 0
  733. #error "Probes need Z_AFTER_PROBING >= 0."
  734. #endif
  735. #if MULTIPLE_PROBING && MULTIPLE_PROBING < 2
  736. #error "MULTIPLE_PROBING must be >= 2."
  737. #endif
  738. #if Z_PROBE_LOW_POINT > 0
  739. #error "Z_PROBE_LOW_POINT must be less than or equal to 0."
  740. #endif
  741. #else
  742. /**
  743. * Require some kind of probe for bed leveling and probe testing
  744. */
  745. #if OLDSCHOOL_ABL && !PROBE_SELECTED
  746. #error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
  747. #endif
  748. #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
  749. #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
  750. #endif
  751. #endif
  752. /**
  753. * Allow only one bed leveling option to be defined
  754. */
  755. #if 1 < 0 \
  756. + ENABLED(AUTO_BED_LEVELING_LINEAR) \
  757. + ENABLED(AUTO_BED_LEVELING_3POINT) \
  758. + ENABLED(AUTO_BED_LEVELING_BILINEAR) \
  759. + ENABLED(AUTO_BED_LEVELING_UBL) \
  760. + ENABLED(MESH_BED_LEVELING)
  761. #error "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
  762. #endif
  763. /**
  764. * Bed Leveling Requirements
  765. */
  766. #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_3POINT)
  767. static_assert(WITHIN(PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_1_X is outside the probe region.");
  768. static_assert(WITHIN(PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_2_X is outside the probe region.");
  769. static_assert(WITHIN(PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_3_X is outside the probe region.");
  770. static_assert(WITHIN(PROBE_PT_1_Y, MIN_PROBE_Y, MAX_PROBE_Y), "PROBE_PT_1_Y is outside the probe region.");
  771. static_assert(WITHIN(PROBE_PT_2_Y, MIN_PROBE_Y, MAX_PROBE_Y), "PROBE_PT_2_Y is outside the probe region.");
  772. static_assert(WITHIN(PROBE_PT_3_Y, MIN_PROBE_Y, MAX_PROBE_Y), "PROBE_PT_3_Y is outside the probe region.");
  773. #endif
  774. #if ENABLED(AUTO_BED_LEVELING_UBL)
  775. /**
  776. * Unified Bed Leveling
  777. */
  778. // Hide PROBE_MANUALLY from the rest of the code
  779. #undef PROBE_MANUALLY
  780. #if IS_SCARA
  781. #error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
  782. #elif DISABLED(EEPROM_SETTINGS)
  783. #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS. Please update your configuration."
  784. #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
  785. #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
  786. #elif !defined(RESTORE_LEVELING_AFTER_G28)
  787. #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
  788. #endif
  789. #elif OLDSCHOOL_ABL
  790. /**
  791. * Auto Bed Leveling
  792. */
  793. /**
  794. * Delta and SCARA have limited bed leveling options
  795. */
  796. #if IS_SCARA && DISABLED(AUTO_BED_LEVELING_BILINEAR)
  797. #error "SCARA machines can only use the AUTO_BED_LEVELING_BILINEAR leveling option."
  798. #endif
  799. /**
  800. * Check auto bed leveling probe points
  801. */
  802. #if ABL_GRID
  803. static_assert(LEFT_PROBE_BED_POSITION < RIGHT_PROBE_BED_POSITION, "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION.");
  804. static_assert(FRONT_PROBE_BED_POSITION < BACK_PROBE_BED_POSITION, "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.");
  805. static_assert(LEFT_PROBE_BED_POSITION >= MIN_PROBE_X, "LEFT_PROBE_BED_POSITION is outside the probe region.");
  806. static_assert(RIGHT_PROBE_BED_POSITION <= MAX_PROBE_X, "RIGHT_PROBE_BED_POSITION is outside the probe region.");
  807. static_assert(FRONT_PROBE_BED_POSITION >= MIN_PROBE_Y, "FRONT_PROBE_BED_POSITION is outside the probe region.");
  808. static_assert(BACK_PROBE_BED_POSITION <= MAX_PROBE_Y, "BACK_PROBE_BED_POSITION is outside the probe region.");
  809. #endif // AUTO_BED_LEVELING_3POINT
  810. #elif ENABLED(MESH_BED_LEVELING)
  811. // Hide PROBE_MANUALLY from the rest of the code
  812. #undef PROBE_MANUALLY
  813. /**
  814. * Mesh Bed Leveling
  815. */
  816. #if ENABLED(DELTA)
  817. #error "MESH_BED_LEVELING is not compatible with DELTA printers."
  818. #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
  819. #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL."
  820. #endif
  821. #endif
  822. #if HAS_MESH
  823. static_assert(DEFAULT_ZJERK > 0.1, "Low DEFAULT_ZJERK values are incompatible with mesh-based leveling.");
  824. #elif ENABLED(G26_MESH_VALIDATION)
  825. #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
  826. #endif
  827. #if ENABLED(MESH_EDIT_GFX_OVERLAY) && (DISABLED(AUTO_BED_LEVELING_UBL) || DISABLED(DOGLCD))
  828. #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
  829. #endif
  830. /**
  831. * LCD_BED_LEVELING requirements
  832. */
  833. #if ENABLED(LCD_BED_LEVELING)
  834. #if DISABLED(ULTIPANEL)
  835. #error "LCD_BED_LEVELING requires an LCD controller."
  836. #elif !(ENABLED(MESH_BED_LEVELING) || (OLDSCHOOL_ABL && ENABLED(PROBE_MANUALLY)))
  837. #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or ABL with PROBE_MANUALLY."
  838. #endif
  839. #endif
  840. /**
  841. * Homing
  842. */
  843. #if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0
  844. #error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0."
  845. #endif
  846. #if ENABLED(CODEPENDENT_XY_HOMING)
  847. #if ENABLED(QUICK_HOME)
  848. #error "QUICK_HOME is incompatible with CODEPENDENT_XY_HOMING."
  849. #elif IS_KINEMATIC
  850. #error "CODEPENDENT_XY_HOMING requires a Cartesian setup."
  851. #endif
  852. #endif
  853. /**
  854. * Make sure Z_SAFE_HOMING point is reachable
  855. */
  856. #if ENABLED(Z_SAFE_HOMING)
  857. #if HAS_BED_PROBE
  858. static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, MIN_PROBE_X, MAX_PROBE_X),
  859. "Z_SAFE_HOMING_X_POINT is outside the probe region.");
  860. static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, MIN_PROBE_Y, MAX_PROBE_Y),
  861. "Z_SAFE_HOMING_Y_POINT is outside the probe region.");
  862. #else
  863. static_assert(WITHIN(Z_SAFE_HOMING_X_POINT, X_MIN_POS, X_MAX_POS),
  864. "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle.");
  865. static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS),
  866. "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle.");
  867. #endif
  868. #endif // Z_SAFE_HOMING
  869. /**
  870. * Make sure DISABLE_[XYZ] compatible with selected homing options
  871. */
  872. #if ENABLED(DISABLE_X) || ENABLED(DISABLE_Y) || ENABLED(DISABLE_Z)
  873. #if ENABLED(HOME_AFTER_DEACTIVATE) || ENABLED(Z_SAFE_HOMING)
  874. #error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
  875. #endif
  876. #endif // DISABLE_[XYZ]
  877. /**
  878. * Filament Width Sensor
  879. */
  880. #if ENABLED(FILAMENT_WIDTH_SENSOR)
  881. #if !HAS_FILAMENT_WIDTH_SENSOR
  882. #error "FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined."
  883. #elif ENABLED(NO_VOLUMETRICS)
  884. #error "FILAMENT_WIDTH_SENSOR requires NO_VOLUMETRICS to be disabled."
  885. #endif
  886. #endif
  887. /**
  888. * ULTIPANEL encoder
  889. */
  890. #if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK)
  891. #error "ULTIPANEL requires some kind of encoder."
  892. #endif
  893. #if ENCODER_PULSES_PER_STEP < 0
  894. #error "ENCODER_PULSES_PER_STEP should not be negative, use REVERSE_MENU_DIRECTION instead."
  895. #endif
  896. /**
  897. * SAV_3DGLCD display options
  898. */
  899. #if ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106)
  900. #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
  901. #endif
  902. /**
  903. * Allen Key
  904. * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis.
  905. */
  906. #if ENABLED(Z_PROBE_ALLEN_KEY) && (Z_HOME_DIR < 0) && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
  907. #error "You can't home to a z min endstop with a Z_PROBE_ALLEN_KEY"
  908. #endif
  909. /**
  910. * Dual X Carriage requirements
  911. */
  912. #if ENABLED(DUAL_X_CARRIAGE)
  913. #if EXTRUDERS == 1
  914. #error "DUAL_X_CARRIAGE requires 2 (or more) extruders."
  915. #elif CORE_IS_XY || CORE_IS_XZ
  916. #error "DUAL_X_CARRIAGE cannot be used with COREXY, COREYX, COREXZ, or COREZX."
  917. #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR
  918. #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined."
  919. #elif !HAS_X_MAX
  920. #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."
  921. #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS)
  922. #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS."
  923. #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1
  924. #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1."
  925. #endif
  926. #endif // DUAL_X_CARRIAGE
  927. /**
  928. * Make sure auto fan pins don't conflict with the fan pin
  929. */
  930. #if HAS_AUTO_FAN
  931. #if HAS_FAN0
  932. #if E0_AUTO_FAN_PIN == FAN_PIN
  933. #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
  934. #elif E1_AUTO_FAN_PIN == FAN_PIN
  935. #error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
  936. #elif E2_AUTO_FAN_PIN == FAN_PIN
  937. #error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
  938. #elif E3_AUTO_FAN_PIN == FAN_PIN
  939. #error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
  940. #endif
  941. #endif
  942. #endif
  943. #if HAS_FAN0 && CONTROLLER_FAN_PIN == FAN_PIN
  944. #error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN."
  945. #endif
  946. #if ENABLED(USE_CONTROLLER_FAN)
  947. #if !HAS_CONTROLLER_FAN
  948. #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
  949. #elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  950. #error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  951. #elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  952. #error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  953. #elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  954. #error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  955. #elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
  956. #error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
  957. #endif
  958. #endif
  959. /**
  960. * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set.
  961. */
  962. #if !HAS_HEATER_0
  963. #error "HEATER_0_PIN not defined for this board."
  964. #elif !PIN_EXISTS(TEMP_0) && !(defined(MAX6675_SS) && MAX6675_SS >= 0)
  965. #error "TEMP_0_PIN not defined for this board."
  966. #elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR)))
  967. #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
  968. #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)))
  969. #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
  970. #elif TEMP_SENSOR_0 == 0
  971. #error "TEMP_SENSOR_0 is required."
  972. #endif
  973. // Pins are required for heaters
  974. #if ENABLED(HEATER_0_USES_MAX6675) && !(defined(MAX6675_SS) && MAX6675_SS >= 0)
  975. #error "MAX6675_SS (required for TEMP_SENSOR_0) not defined for this board."
  976. #elif (HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1
  977. #error "HEATER_1_PIN not defined for this board."
  978. #endif
  979. #if HOTENDS > 1
  980. #if TEMP_SENSOR_1 == 0
  981. #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
  982. #elif !PIN_EXISTS(TEMP_1)
  983. #error "TEMP_1_PIN not defined for this board."
  984. #endif
  985. #if HOTENDS > 2
  986. #if TEMP_SENSOR_2 == 0
  987. #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
  988. #elif !HAS_HEATER_2
  989. #error "HEATER_2_PIN not defined for this board."
  990. #elif !PIN_EXISTS(TEMP_2)
  991. #error "TEMP_2_PIN not defined for this board."
  992. #endif
  993. #if HOTENDS > 3
  994. #if TEMP_SENSOR_3 == 0
  995. #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS."
  996. #elif !HAS_HEATER_3
  997. #error "HEATER_3_PIN not defined for this board."
  998. #elif !PIN_EXISTS(TEMP_3)
  999. #error "TEMP_3_PIN not defined for this board."
  1000. #endif
  1001. #if HOTENDS > 4
  1002. #if TEMP_SENSOR_4 == 0
  1003. #error "TEMP_SENSOR_4 is required with 5 HOTENDS."
  1004. #elif !HAS_HEATER_4
  1005. #error "HEATER_4_PIN not defined for this board."
  1006. #elif !PIN_EXISTS(TEMP_4)
  1007. #error "TEMP_4_PIN not defined for this board."
  1008. #endif
  1009. #elif TEMP_SENSOR_4 != 0
  1010. #error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS."
  1011. #endif
  1012. #elif TEMP_SENSOR_3 != 0
  1013. #error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS."
  1014. #elif TEMP_SENSOR_4 != 0
  1015. #error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS."
  1016. #endif
  1017. #elif TEMP_SENSOR_2 != 0
  1018. #error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS."
  1019. #elif TEMP_SENSOR_3 != 0
  1020. #error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS."
  1021. #elif TEMP_SENSOR_4 != 0
  1022. #error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS."
  1023. #endif
  1024. #elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
  1025. #error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND."
  1026. #elif TEMP_SENSOR_2 != 0
  1027. #error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND."
  1028. #elif TEMP_SENSOR_3 != 0
  1029. #error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND."
  1030. #elif TEMP_SENSOR_4 != 0
  1031. #error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND."
  1032. #endif
  1033. #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
  1034. #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT."
  1035. #endif
  1036. /**
  1037. * Temperature status LEDs
  1038. */
  1039. #if ENABLED(TEMP_STAT_LEDS) && !PIN_EXISTS(STAT_LED_RED) && !PIN_EXISTS(STAT_LED_BLUE)
  1040. #error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
  1041. #endif
  1042. /**
  1043. * Basic 2-nozzle duplication mode
  1044. */
  1045. #if ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
  1046. #if HOTENDS != 2
  1047. #error "DUAL_NOZZLE_DUPLICATION_MODE requires exactly 2 hotends."
  1048. #elif ENABLED(DUAL_X_CARRIAGE)
  1049. #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with DUAL_X_CARRIAGE."
  1050. #elif ENABLED(SINGLENOZZLE)
  1051. #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SINGLENOZZLE."
  1052. #elif ENABLED(MIXING_EXTRUDER)
  1053. #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with MIXING_EXTRUDER."
  1054. #elif ENABLED(SWITCHING_EXTRUDER)
  1055. #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SWITCHING_EXTRUDER."
  1056. #endif
  1057. #endif
  1058. /**
  1059. * Test Extruder Stepper Pins
  1060. */
  1061. #if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
  1062. #if E_STEPPERS > 4
  1063. #if !PIN_EXISTS(E4_STEP) || !PIN_EXISTS(E4_DIR) || !PIN_EXISTS(E4_ENABLE)
  1064. #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
  1065. #endif
  1066. #elif E_STEPPERS > 3
  1067. #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
  1068. #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
  1069. #endif
  1070. #elif E_STEPPERS > 2
  1071. #if !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE)
  1072. #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
  1073. #endif
  1074. #elif E_STEPPERS > 1
  1075. #if !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE)
  1076. #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
  1077. #endif
  1078. #endif
  1079. #endif
  1080. /**
  1081. * Endstop Tests
  1082. */
  1083. #define _PLUG_UNUSED_TEST(AXIS,PLUG) (DISABLED(USE_##PLUG##MIN_PLUG) && DISABLED(USE_##PLUG##MAX_PLUG) && !(ENABLED(AXIS##_DUAL_ENDSTOPS) && WITHIN(AXIS##2_USE_ENDSTOP, _##PLUG##MAX_, _##PLUG##MIN_)))
  1084. #define _AXIS_PLUG_UNUSED_TEST(AXIS) (_PLUG_UNUSED_TEST(AXIS,X) && _PLUG_UNUSED_TEST(AXIS,Y) && _PLUG_UNUSED_TEST(AXIS,Z))
  1085. // At least 3 endstop plugs must be used
  1086. #if _AXIS_PLUG_UNUSED_TEST(X)
  1087. #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG."
  1088. #endif
  1089. #if _AXIS_PLUG_UNUSED_TEST(Y)
  1090. #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG."
  1091. #endif
  1092. #if _AXIS_PLUG_UNUSED_TEST(Z)
  1093. #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
  1094. #endif
  1095. // Delta and Cartesian use 3 homing endstops
  1096. #if !IS_SCARA
  1097. #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG)
  1098. #error "Enable USE_XMIN_PLUG when homing X to MIN."
  1099. #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG)
  1100. #error "Enable USE_XMAX_PLUG when homing X to MAX."
  1101. #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG)
  1102. #error "Enable USE_YMIN_PLUG when homing Y to MIN."
  1103. #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG)
  1104. #error "Enable USE_YMAX_PLUG when homing Y to MAX."
  1105. #endif
  1106. #endif
  1107. #if Z_HOME_DIR < 0 && DISABLED(USE_ZMIN_PLUG)
  1108. #error "Enable USE_ZMIN_PLUG when homing Z to MIN."
  1109. #elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG)
  1110. #error "Enable USE_ZMAX_PLUG when homing Z to MAX."
  1111. #endif
  1112. // Dual endstops requirements
  1113. #if ENABLED(X_DUAL_ENDSTOPS)
  1114. #if !X2_USE_ENDSTOP
  1115. #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS."
  1116. #elif X2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
  1117. #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _X_MIN_."
  1118. #elif X2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
  1119. #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _X_MAX_."
  1120. #elif X2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
  1121. #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _Y_MIN_."
  1122. #elif X2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
  1123. #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _Y_MAX_."
  1124. #elif X2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
  1125. #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _Z_MIN_."
  1126. #elif X2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
  1127. #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _Z_MAX_."
  1128. #elif !HAS_X2_MIN && !HAS_X2_MAX
  1129. #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1130. #elif ENABLED(DELTA)
  1131. #error "X_DUAL_ENDSTOPS is not compatible with DELTA."
  1132. #endif
  1133. #endif
  1134. #if ENABLED(Y_DUAL_ENDSTOPS)
  1135. #if !Y2_USE_ENDSTOP
  1136. #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS."
  1137. #elif Y2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
  1138. #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _X_MIN_."
  1139. #elif Y2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
  1140. #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _X_MAX_."
  1141. #elif Y2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
  1142. #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _Y_MIN_."
  1143. #elif Y2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
  1144. #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _Y_MAX_."
  1145. #elif Y2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
  1146. #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _Z_MIN_."
  1147. #elif Y2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
  1148. #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _Z_MAX_."
  1149. #elif !HAS_Y2_MIN && !HAS_Y2_MAX
  1150. #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1151. #elif ENABLED(DELTA)
  1152. #error "Y_DUAL_ENDSTOPS is not compatible with DELTA."
  1153. #endif
  1154. #endif
  1155. #if ENABLED(Z_DUAL_ENDSTOPS)
  1156. #if !Z2_USE_ENDSTOP
  1157. #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS."
  1158. #elif Z2_USE_ENDSTOP == _X_MIN_ && DISABLED(USE_XMIN_PLUG)
  1159. #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _X_MIN_."
  1160. #elif Z2_USE_ENDSTOP == _X_MAX_ && DISABLED(USE_XMAX_PLUG)
  1161. #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _X_MAX_."
  1162. #elif Z2_USE_ENDSTOP == _Y_MIN_ && DISABLED(USE_YMIN_PLUG)
  1163. #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _Y_MIN_."
  1164. #elif Z2_USE_ENDSTOP == _Y_MAX_ && DISABLED(USE_YMAX_PLUG)
  1165. #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _Y_MAX_."
  1166. #elif Z2_USE_ENDSTOP == _Z_MIN_ && DISABLED(USE_ZMIN_PLUG)
  1167. #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _Z_MIN_."
  1168. #elif Z2_USE_ENDSTOP == _Z_MAX_ && DISABLED(USE_ZMAX_PLUG)
  1169. #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _Z_MAX_."
  1170. #elif !HAS_Z2_MIN && !HAS_Z2_MAX
  1171. #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!"
  1172. #elif ENABLED(DELTA)
  1173. #error "Z_DUAL_ENDSTOPS is not compatible with DELTA."
  1174. #endif
  1175. #endif
  1176. /**
  1177. * emergency-command parser
  1178. */
  1179. #if ENABLED(EMERGENCY_PARSER) && defined(__AVR__) && defined(USBCON)
  1180. #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
  1181. #endif
  1182. /**
  1183. * I2C bus
  1184. */
  1185. #if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0
  1186. #if I2C_SLAVE_ADDRESS < 8
  1187. #error "I2C_SLAVE_ADDRESS can't be less than 8. (Addresses 0 - 7 are reserved.)"
  1188. #elif I2C_SLAVE_ADDRESS > 127
  1189. #error "I2C_SLAVE_ADDRESS can't be over 127. (Only 7 bits allowed.)"
  1190. #endif
  1191. #endif
  1192. /**
  1193. * G38 Probe Target
  1194. */
  1195. #if ENABLED(G38_PROBE_TARGET)
  1196. #if !HAS_BED_PROBE
  1197. #error "G38_PROBE_TARGET requires a bed probe."
  1198. #elif !IS_CARTESIAN
  1199. #error "G38_PROBE_TARGET requires a Cartesian machine."
  1200. #endif
  1201. #endif
  1202. /**
  1203. * RGB_LED Requirements
  1204. */
  1205. #define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B))
  1206. #if ENABLED(RGB_LED)
  1207. #if !_RGB_TEST
  1208. #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
  1209. #elif ENABLED(RGBW_LED)
  1210. #error "Please enable only one of RGB_LED and RGBW_LED."
  1211. #endif
  1212. #elif ENABLED(RGBW_LED)
  1213. #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W))
  1214. #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN."
  1215. #endif
  1216. #elif ENABLED(NEOPIXEL_LED)
  1217. #if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0)
  1218. #error "NEOPIXEL_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
  1219. #endif
  1220. #elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) && DISABLED(NEOPIXEL_LED)
  1221. #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
  1222. #endif
  1223. /**
  1224. * Auto Fan check for PWM pins
  1225. */
  1226. #if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
  1227. #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
  1228. #if HAS_AUTO_FAN_0
  1229. static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
  1230. #elif HAS_AUTO_FAN_1
  1231. static_assert(GET_TIMER(E1_AUTO_FAN_PIN), "E1" AF_ERR_SUFF);
  1232. #elif HAS_AUTO_FAN_2
  1233. static_assert(GET_TIMER(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF);
  1234. #elif HAS_AUTO_FAN_3
  1235. static_assert(GET_TIMER(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF);
  1236. #endif
  1237. #endif
  1238. /**
  1239. * Make sure only one display is enabled
  1240. *
  1241. * Note: BQ_LCD_SMART_CONTROLLER => REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  1242. * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER => REPRAP_DISCOUNT_SMART_CONTROLLER
  1243. * SAV_3DGLCD => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
  1244. * MKS_12864OLED => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
  1245. * MKS_12864OLED_SSD1306 => U8GLIB_SSD1306 => ULTIMAKERCONTROLLER
  1246. * MKS_MINI_12864 => MINIPANEL
  1247. * miniVIKI => ULTIMAKERCONTROLLER
  1248. * VIKI2 => ULTIMAKERCONTROLLER
  1249. * ELB_FULL_GRAPHIC_CONTROLLER => ULTIMAKERCONTROLLER
  1250. * AZSMZ_12864 => ULTIMAKERCONTROLLER
  1251. * PANEL_ONE => ULTIMAKERCONTROLLER
  1252. */
  1253. #if 1 < 0 \
  1254. + ( ENABLED(ULTIMAKERCONTROLLER) \
  1255. && DISABLED(SAV_3DGLCD) \
  1256. && DISABLED(miniVIKI) \
  1257. && DISABLED(VIKI2) \
  1258. && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
  1259. && DISABLED(AZSMZ_12864) \
  1260. && DISABLED(PANEL_ONE) \
  1261. && DISABLED(MKS_12864OLED) \
  1262. && DISABLED(MKS_12864OLED_SSD1306) ) \
  1263. + ( ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
  1264. && DISABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
  1265. && DISABLED(LCD_FOR_MELZI) \
  1266. && DISABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
  1267. && DISABLED(MKS_12864OLED) \
  1268. && DISABLED(MKS_12864OLED_SSD1306) ) \
  1269. + (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(BQ_LCD_SMART_CONTROLLER)) \
  1270. + ENABLED(LCD_FOR_MELZI) \
  1271. + ENABLED(MKS_12864OLED) \
  1272. + ENABLED(MKS_12864OLED_SSD1306) \
  1273. + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
  1274. + ENABLED(CARTESIO_UI) \
  1275. + ENABLED(PANEL_ONE) \
  1276. + ENABLED(MAKRPANEL) \
  1277. + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \
  1278. + ENABLED(VIKI2) \
  1279. + ENABLED(miniVIKI) \
  1280. + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
  1281. + ENABLED(AZSMZ_12864) \
  1282. + ENABLED(G3D_PANEL) \
  1283. + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)) \
  1284. + ENABLED(MKS_MINI_12864) \
  1285. + (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI) && DISABLED(ZONESTAR_LCD)) \
  1286. + ENABLED(RIGIDBOT_PANEL) \
  1287. + ENABLED(RA_CONTROL_PANEL) \
  1288. + ENABLED(LCD_SAINSMART_I2C_1602) \
  1289. + ENABLED(LCD_SAINSMART_I2C_2004) \
  1290. + ENABLED(LCM1602) \
  1291. + ENABLED(LCD_I2C_PANELOLU2) \
  1292. + ENABLED(LCD_I2C_VIKI) \
  1293. + (ENABLED(U8GLIB_SSD1306) && DISABLED(OLED_PANEL_TINYBOY2) && DISABLED(MKS_12864OLED_SSD1306)) \
  1294. + ENABLED(SAV_3DLCD) \
  1295. + ENABLED(BQ_LCD_SMART_CONTROLLER) \
  1296. + ENABLED(SAV_3DGLCD) \
  1297. + ENABLED(OLED_PANEL_TINYBOY2) \
  1298. + ENABLED(ZONESTAR_LCD) \
  1299. + ENABLED(ULTI_CONTROLLER)
  1300. #error "Please select no more than one LCD controller option."
  1301. #endif
  1302. /**
  1303. * Make sure HAVE_TMC26X is warranted
  1304. */
  1305. #if ENABLED(HAVE_TMC26X) && !( \
  1306. ENABLED( X_IS_TMC26X ) \
  1307. || ENABLED( X2_IS_TMC26X ) \
  1308. || ENABLED( Y_IS_TMC26X ) \
  1309. || ENABLED( Y2_IS_TMC26X ) \
  1310. || ENABLED( Z_IS_TMC26X ) \
  1311. || ENABLED( Z2_IS_TMC26X ) \
  1312. || ENABLED( E0_IS_TMC26X ) \
  1313. || ENABLED( E1_IS_TMC26X ) \
  1314. || ENABLED( E2_IS_TMC26X ) \
  1315. || ENABLED( E3_IS_TMC26X ) \
  1316. || ENABLED( E4_IS_TMC26X ) \
  1317. )
  1318. #error "HAVE_TMC26X requires at least one TMC26X stepper to be set."
  1319. #endif
  1320. /**
  1321. * Make sure HAVE_TMC2130 is warranted
  1322. */
  1323. #if ENABLED(HAVE_TMC2130)
  1324. #if !( ENABLED( X_IS_TMC2130 ) \
  1325. || ENABLED( X2_IS_TMC2130 ) \
  1326. || ENABLED( Y_IS_TMC2130 ) \
  1327. || ENABLED( Y2_IS_TMC2130 ) \
  1328. || ENABLED( Z_IS_TMC2130 ) \
  1329. || ENABLED( Z2_IS_TMC2130 ) \
  1330. || ENABLED( E0_IS_TMC2130 ) \
  1331. || ENABLED( E1_IS_TMC2130 ) \
  1332. || ENABLED( E2_IS_TMC2130 ) \
  1333. || ENABLED( E3_IS_TMC2130 ) \
  1334. || ENABLED( E4_IS_TMC2130 ) )
  1335. #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set."
  1336. #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
  1337. #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
  1338. #endif
  1339. #if ENABLED(X_IS_TMC2130) && !PIN_EXISTS(X_CS)
  1340. #error "X_CS_PIN is required for X_IS_TMC2130. Define X_CS_PIN in Configuration_adv.h."
  1341. #elif ENABLED(X2_IS_TMC2130) && !PIN_EXISTS(X2_CS)
  1342. #error "X2_CS_PIN is required for X2_IS_TMC2130. Define X2_CS_PIN in Configuration_adv.h."
  1343. #elif ENABLED(Y_IS_TMC2130) && !PIN_EXISTS(Y_CS)
  1344. #error "Y_CS_PIN is required for Y_IS_TMC2130. Define Y_CS_PIN in Configuration_adv.h."
  1345. #elif ENABLED(Y2_IS_TMC2130) && !PIN_EXISTS(Y2_CS)
  1346. #error "Y2_CS_PIN is required for Y2_IS_TMC2130. Define Y2_CS_PIN in Configuration_adv.h."
  1347. #elif ENABLED(Z_IS_TMC2130) && !PIN_EXISTS(Z_CS)
  1348. #error "Z_CS_PIN is required for Z_IS_TMC2130. Define Z_CS_PIN in Configuration_adv.h."
  1349. #elif ENABLED(Z2_IS_TMC2130) && !PIN_EXISTS(Z2_CS)
  1350. #error "Z2_CS_PIN is required for Z2_IS_TMC2130. Define Z2_CS_PIN in Configuration_adv.h."
  1351. #elif ENABLED(E0_IS_TMC2130) && !PIN_EXISTS(E0_CS)
  1352. #error "E0_CS_PIN is required for E0_IS_TMC2130. Define E0_CS_PIN in Configuration_adv.h."
  1353. #elif ENABLED(E1_IS_TMC2130) && !PIN_EXISTS(E1_CS)
  1354. #error "E1_CS_PIN is required for E1_IS_TMC2130. Define E1_CS_PIN in Configuration_adv.h."
  1355. #elif ENABLED(E2_IS_TMC2130) && !PIN_EXISTS(E2_CS)
  1356. #error "E2_CS_PIN is required for E2_IS_TMC2130. Define E2_CS_PIN in Configuration_adv.h."
  1357. #elif ENABLED(E3_IS_TMC2130) && !PIN_EXISTS(E3_CS)
  1358. #error "E3_CS_PIN is required for E3_IS_TMC2130. Define E3_CS_PIN in Configuration_adv.h."
  1359. #elif ENABLED(E4_IS_TMC2130) && !PIN_EXISTS(E4_CS)
  1360. #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h."
  1361. #endif
  1362. #if ENABLED(SENSORLESS_HOMING)
  1363. // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop
  1364. // is necessary in order to reset the stallGuard indication between the initial movement of all three
  1365. // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of
  1366. // clearing the stallGuard activated status is found.
  1367. #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP)
  1368. #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP."
  1369. #elif X_HOME_DIR == -1 && DISABLED(X_MIN_ENDSTOP_INVERTING)
  1370. #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING when homing to X_MIN."
  1371. #elif X_HOME_DIR == 1 && DISABLED(X_MAX_ENDSTOP_INVERTING)
  1372. #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING when homing to X_MAX."
  1373. #elif Y_HOME_DIR == -1 && DISABLED(Y_MIN_ENDSTOP_INVERTING)
  1374. #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING when homing to Y_MIN."
  1375. #elif Y_HOME_DIR == 1 && DISABLED(Y_MAX_ENDSTOP_INVERTING)
  1376. #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING when homing to Y_MAX."
  1377. #endif
  1378. #endif
  1379. // Sensorless homing is required for both combined steppers in an H-bot
  1380. #if CORE_IS_XY && X_SENSORLESS != Y_SENSORLESS
  1381. #error "CoreXY requires both X and Y to use sensorless homing if either does."
  1382. #elif CORE_IS_XZ && X_SENSORLESS != Z_SENSORLESS
  1383. #error "CoreXZ requires both X and Z to use sensorless homing if either does."
  1384. #elif CORE_IS_YZ && Y_SENSORLESS != Z_SENSORLESS
  1385. #error "CoreYZ requires both Y and Z to use sensorless homing if either does."
  1386. #endif
  1387. #elif ENABLED(SENSORLESS_HOMING)
  1388. #error "SENSORLESS_HOMING requires TMC2130 stepper drivers."
  1389. #endif
  1390. /**
  1391. * Make sure HAVE_TMC2208 is warranted
  1392. */
  1393. #if ENABLED(HAVE_TMC2208) && !( \
  1394. ENABLED( X_IS_TMC2208 ) \
  1395. || ENABLED( X2_IS_TMC2208 ) \
  1396. || ENABLED( Y_IS_TMC2208 ) \
  1397. || ENABLED( Y2_IS_TMC2208 ) \
  1398. || ENABLED( Z_IS_TMC2208 ) \
  1399. || ENABLED( Z2_IS_TMC2208 ) \
  1400. || ENABLED( E0_IS_TMC2208 ) \
  1401. || ENABLED( E1_IS_TMC2208 ) \
  1402. || ENABLED( E2_IS_TMC2208 ) \
  1403. || ENABLED( E3_IS_TMC2208 ) )
  1404. #error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set."
  1405. #endif
  1406. /**
  1407. * TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
  1408. */
  1409. #if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
  1410. defined(X_HARDWARE_SERIAL ) \
  1411. || defined(X2_HARDWARE_SERIAL) \
  1412. || defined(Y_HARDWARE_SERIAL ) \
  1413. || defined(Y2_HARDWARE_SERIAL) \
  1414. || defined(Z_HARDWARE_SERIAL ) \
  1415. || defined(Z2_HARDWARE_SERIAL) \
  1416. || defined(E0_HARDWARE_SERIAL) \
  1417. || defined(E1_HARDWARE_SERIAL) \
  1418. || defined(E2_HARDWARE_SERIAL) \
  1419. || defined(E3_HARDWARE_SERIAL) \
  1420. || defined(E4_HARDWARE_SERIAL) )
  1421. #error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
  1422. #endif
  1423. #if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP)
  1424. #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD."
  1425. #endif
  1426. #if ENABLED(TMC_Z_CALIBRATION) && !Z_IS_TRINAMIC && !Z2_IS_TRINAMIC
  1427. #error "TMC_Z_CALIBRATION requires at least one TMC driver on Z axis"
  1428. #endif
  1429. /**
  1430. * Make sure HAVE_L6470DRIVER is warranted
  1431. */
  1432. #if ENABLED(HAVE_L6470DRIVER) && !( \
  1433. ENABLED( X_IS_L6470 ) \
  1434. || ENABLED( X2_IS_L6470 ) \
  1435. || ENABLED( Y_IS_L6470 ) \
  1436. || ENABLED( Y2_IS_L6470 ) \
  1437. || ENABLED( Z_IS_L6470 ) \
  1438. || ENABLED( Z2_IS_L6470 ) \
  1439. || ENABLED( E0_IS_L6470 ) \
  1440. || ENABLED( E1_IS_L6470 ) \
  1441. || ENABLED( E2_IS_L6470 ) \
  1442. || ENABLED( E3_IS_L6470 ) \
  1443. || ENABLED( E4_IS_L6470 ) \
  1444. )
  1445. #error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set."
  1446. #endif
  1447. /**
  1448. * Check that each axis has only one driver selected
  1449. */
  1450. #if 1 < 0 \
  1451. + ENABLED(X_IS_TMC26X) \
  1452. + ENABLED(X_IS_TMC2130) \
  1453. + ENABLED(X_IS_TMC2208) \
  1454. + ENABLED(X_IS_L6470)
  1455. #error "Please enable only one stepper driver for the X axis."
  1456. #endif
  1457. #if 1 < 0 \
  1458. + ENABLED(X2_IS_TMC26X) \
  1459. + ENABLED(X2_IS_TMC2130) \
  1460. + ENABLED(X2_IS_TMC2208) \
  1461. + ENABLED(X2_IS_L6470)
  1462. #error "Please enable only one stepper driver for the X2 axis."
  1463. #endif
  1464. #if 1 < 0 \
  1465. + ENABLED(Y_IS_TMC26X) \
  1466. + ENABLED(Y_IS_TMC2130) \
  1467. + ENABLED(Y_IS_TMC2208) \
  1468. + ENABLED(Y_IS_L6470)
  1469. #error "Please enable only one stepper driver for the Y axis."
  1470. #endif
  1471. #if 1 < 0 \
  1472. + ENABLED(Y2_IS_TMC26X) \
  1473. + ENABLED(Y2_IS_TMC2130) \
  1474. + ENABLED(Y2_IS_TMC2208) \
  1475. + ENABLED(Y2_IS_L6470)
  1476. #error "Please enable only one stepper driver for the Y2 axis."
  1477. #endif
  1478. #if 1 < 0 \
  1479. + ENABLED(Z_IS_TMC26X) \
  1480. + ENABLED(Z_IS_TMC2130) \
  1481. + ENABLED(Z_IS_TMC2208) \
  1482. + ENABLED(Z_IS_L6470)
  1483. #error "Please enable only one stepper driver for the Z axis."
  1484. #endif
  1485. #if 1 < 0 \
  1486. + ENABLED(Z2_IS_TMC26X) \
  1487. + ENABLED(Z2_IS_TMC2130) \
  1488. + ENABLED(Z2_IS_TMC2208) \
  1489. + ENABLED(Z2_IS_L6470)
  1490. #error "Please enable only one stepper driver for the Z2 axis."
  1491. #endif
  1492. #if 1 < 0 \
  1493. + ENABLED(E0_IS_TMC26X) \
  1494. + ENABLED(E0_IS_TMC2130) \
  1495. + ENABLED(E0_IS_TMC2208) \
  1496. + ENABLED(E0_IS_L6470)
  1497. #error "Please enable only one stepper driver for the E0 axis."
  1498. #endif
  1499. #if 1 < 0 \
  1500. + ENABLED(E1_IS_TMC26X) \
  1501. + ENABLED(E1_IS_TMC2130) \
  1502. + ENABLED(E1_IS_TMC2208) \
  1503. + ENABLED(E1_IS_L6470)
  1504. #error "Please enable only one stepper driver for the E1 axis."
  1505. #endif
  1506. #if 1 < 0 \
  1507. + ENABLED(E2_IS_TMC26X) \
  1508. + ENABLED(E2_IS_TMC2130) \
  1509. + ENABLED(E2_IS_TMC2208) \
  1510. + ENABLED(E2_IS_L6470)
  1511. #error "Please enable only one stepper driver for the E2 axis."
  1512. #endif
  1513. #if 1 < 0 \
  1514. + ENABLED(E3_IS_TMC26X) \
  1515. + ENABLED(E3_IS_TMC2130) \
  1516. + ENABLED(E3_IS_TMC2208) \
  1517. + ENABLED(E3_IS_L6470)
  1518. #error "Please enable only one stepper driver for the E3 axis."
  1519. #endif
  1520. #if 1 < 0 \
  1521. + ENABLED(E4_IS_TMC26X) \
  1522. + ENABLED(E4_IS_TMC2130) \
  1523. + ENABLED(E4_IS_TMC2208) \
  1524. + ENABLED(E4_IS_L6470)
  1525. #error "Please enable only one stepper driver for the E4 axis."
  1526. #endif
  1527. /**
  1528. * Digipot requirement
  1529. */
  1530. #if ENABLED(DIGIPOT_MCP4018)
  1531. #if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
  1532. || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
  1533. #error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
  1534. #endif
  1535. #endif
  1536. /**
  1537. * Require 4 or more elements in per-axis initializers
  1538. */
  1539. constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT,
  1540. sanity_arr_2[] = DEFAULT_MAX_FEEDRATE,
  1541. sanity_arr_3[] = DEFAULT_MAX_ACCELERATION;
  1542. static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires 4 (or more) elements.");
  1543. static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires 4 (or more) elements.");
  1544. static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires 4 (or more) elements.");
  1545. static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements.");
  1546. static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements.");
  1547. static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements.");
  1548. #if ENABLED(CNC_COORDINATE_SYSTEMS) && ENABLED(NO_WORKSPACE_OFFSETS)
  1549. #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS."
  1550. #endif
  1551. #if !BLOCK_BUFFER_SIZE || !IS_POWER_OF_2(BLOCK_BUFFER_SIZE)
  1552. #error "BLOCK_BUFFER_SIZE must be a power of 2."
  1553. #endif
  1554. #if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
  1555. #error "LED_CONTROL_MENU requires an LCD controller."
  1556. #endif
  1557. #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)
  1558. #error "CASE_LIGHT_USE_NEOPIXEL requires NEOPIXEL_LED."
  1559. #endif
  1560. #if ENABLED(SKEW_CORRECTION)
  1561. #if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
  1562. #error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
  1563. #endif
  1564. #if ENABLED(SKEW_CORRECTION_FOR_Z)
  1565. #if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
  1566. #error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
  1567. #endif
  1568. #if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
  1569. #error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
  1570. #endif
  1571. #endif
  1572. #endif
  1573. #endif // _SANITYCHECK_H_