Extended condition macros (#13419)
Allow `ENABLED`, `DISABLED`, `PIN_EXISTS`, and `BUTTON_EXISTS` to take multiple arguments. Also add: - Alias `ANY(...)` for `!DISABLED(...)` - Alias `ANY_PIN(...)` for `PIN_EXISTS(a) || PIN_EXISTS(b) ...` - Alias `EITHER(A,B)` for `ANY(...)` - Alias `ALL(...)` and `BOTH(A,B)` for `ENABLED(...)` - `NONE(...)` for `DISABLED(...)`
This commit is contained in:
@ -64,7 +64,7 @@
|
||||
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864)
|
||||
#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
|
||||
|
||||
#define ULTRA_LCD
|
||||
#define DOGLCD
|
||||
@ -141,7 +141,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
|
||||
#if EITHER(MAKRPANEL, MINIPANEL)
|
||||
#define DOGLCD
|
||||
#define ULTIPANEL
|
||||
#define DEFAULT_LCD_CONTRAST 17
|
||||
@ -159,13 +159,13 @@
|
||||
#endif
|
||||
|
||||
// 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
|
||||
#define HAS_SSD1306_OLED_I2C (ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SSD1309) || ENABLED(U8GLIB_SH1106))
|
||||
#define HAS_SSD1306_OLED_I2C ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106)
|
||||
#if HAS_SSD1306_OLED_I2C
|
||||
#define ULTRA_LCD
|
||||
#define DOGLCD
|
||||
#endif
|
||||
|
||||
#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
|
||||
#if EITHER(PANEL_ONE, U8GLIB_SH1106)
|
||||
|
||||
#define ULTIMAKERCONTROLLER
|
||||
|
||||
@ -177,17 +177,13 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
|
||||
#if ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIMAKERCONTROLLER) \
|
||||
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
|
||||
|| ENABLED(G3D_PANEL) \
|
||||
|| ENABLED(RIGIDBOT_PANEL) \
|
||||
|| ENABLED(ULTI_CONTROLLER)
|
||||
#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, ULTI_CONTROLLER)
|
||||
#define ULTIPANEL
|
||||
#endif
|
||||
|
||||
@ -223,7 +219,7 @@
|
||||
* I2C PANELS
|
||||
*/
|
||||
|
||||
#if ENABLED(LCD_SAINSMART_I2C_1602) || ENABLED(LCD_SAINSMART_I2C_2004)
|
||||
#if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
|
||||
|
||||
#define LCD_I2C_TYPE_PCF8575
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
@ -267,15 +263,11 @@
|
||||
#define STD_ENCODER_PULSES_PER_STEP 2
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
|
||||
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|
||||
|| ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
||||
|| ENABLED(AZSMZ_12864) \
|
||||
|| ENABLED(OLED_PANEL_TINYBOY2) \
|
||||
|| ENABLED(BQ_LCD_SMART_CONTROLLER) \
|
||||
|| ENABLED(LCD_I2C_PANELOLU2) \
|
||||
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2, REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef STD_ENCODER_PULSES_PER_STEP
|
||||
@ -400,16 +392,16 @@
|
||||
#endif
|
||||
|
||||
// No inactive extruders with MK2_MULTIPLEXER or SWITCHING_NOZZLE
|
||||
#if ENABLED(MK2_MULTIPLEXER) || ENABLED(SWITCHING_NOZZLE)
|
||||
#if EITHER(MK2_MULTIPLEXER, SWITCHING_NOZZLE)
|
||||
#undef DISABLE_INACTIVE_EXTRUDER
|
||||
#endif
|
||||
|
||||
// Prusa MK2 Multiplexer and MMU 2.0 force SINGLENOZZLE
|
||||
#if ENABLED(MK2_MULTIPLEXER) || ENABLED(PRUSA_MMU2)
|
||||
#if EITHER(MK2_MULTIPLEXER, PRUSA_MMU2)
|
||||
#define SINGLENOZZLE
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
||||
#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
||||
#undef HOTENDS
|
||||
#define HOTENDS 1
|
||||
#undef TEMP_SENSOR_1_AS_REDUNDANT
|
||||
@ -435,7 +427,7 @@
|
||||
#define SWITCHING_NOZZLE_TWO_SERVOS defined(SWITCHING_NOZZLE_E1_SERVO_NR)
|
||||
|
||||
#define HAS_HOTEND_OFFSET (HOTENDS > 1)
|
||||
#define HAS_DUPLICATION_MODE (ENABLED(DUAL_X_CARRIAGE) || ENABLED(MULTI_NOZZLE_DUPLICATION))
|
||||
#define HAS_DUPLICATION_MODE EITHER(DUAL_X_CARRIAGE, MULTI_NOZZLE_DUPLICATION)
|
||||
|
||||
/**
|
||||
* DISTINCT_E_FACTORS affects how some E factors are accessed
|
||||
@ -506,8 +498,8 @@
|
||||
/**
|
||||
* Set flags for enabled probes
|
||||
*/
|
||||
#define HAS_BED_PROBE (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_PROBE || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE) || ENABLED(SENSORLESS_PROBING) || ENABLED(RACK_AND_PINION_PROBE))
|
||||
#define PROBE_SELECTED (HAS_BED_PROBE || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING))
|
||||
#define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE))
|
||||
#define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#define USES_Z_MIN_PROBE_ENDSTOP DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
@ -528,19 +520,19 @@
|
||||
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
|
||||
#endif
|
||||
|
||||
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
||||
#define HAS_RESUME_CONTINUE (ENABLED(EXTENSIBLE_UI) || ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
|
||||
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533) || ENABLED(NEOPIXEL_LED))
|
||||
#define HAS_LEDS_OFF_FLAG (ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT) && HAS_RESUME_CONTINUE)
|
||||
#define HAS_PRINT_PROGRESS (ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY))
|
||||
#define HAS_SOFTWARE_ENDSTOPS EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
||||
#define HAS_RESUME_CONTINUE ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
|
||||
#define HAS_COLOR_LEDS ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
|
||||
#define HAS_LEDS_OFF_FLAG (BOTH(PRINTER_EVENT_LEDS, SDSUPPORT) && HAS_RESUME_CONTINUE)
|
||||
#define HAS_PRINT_PROGRESS EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
|
||||
#define HAS_SERVICE_INTERVALS (SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0)
|
||||
#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
#define HAS_FILAMENT_SENSOR ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
|
||||
#define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
|
||||
#define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS))
|
||||
#define HAS_EXTRA_ENDSTOPS (ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS)
|
||||
#define Z_MULTI_STEPPER_DRIVERS EITHER(Z_DUAL_STEPPER_DRIVERS, Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#define Z_MULTI_ENDSTOPS EITHER(Z_DUAL_ENDSTOPS, Z_TRIPLE_ENDSTOPS)
|
||||
#define HAS_EXTRA_ENDSTOPS (EITHER(X_DUAL_ENDSTOPS, Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS)
|
||||
|
||||
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
|
||||
#define IS_SCARA EITHER(MORGAN_SCARA, MAKERARM_SCARA)
|
||||
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
|
||||
#define IS_CARTESIAN !IS_KINEMATIC
|
||||
|
||||
|
@ -106,9 +106,9 @@
|
||||
/**
|
||||
* CoreXY, CoreXZ, and CoreYZ - and their reverse
|
||||
*/
|
||||
#define CORE_IS_XY (ENABLED(COREXY) || ENABLED(COREYX))
|
||||
#define CORE_IS_XZ (ENABLED(COREXZ) || ENABLED(COREZX))
|
||||
#define CORE_IS_YZ (ENABLED(COREYZ) || ENABLED(COREZY))
|
||||
#define CORE_IS_XY EITHER(COREXY, COREYX)
|
||||
#define CORE_IS_XZ EITHER(COREXZ, COREZX)
|
||||
#define CORE_IS_YZ EITHER(COREYZ, COREZY)
|
||||
#define IS_CORE (CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ)
|
||||
#if IS_CORE
|
||||
#if CORE_IS_XY
|
||||
@ -124,7 +124,7 @@
|
||||
#define CORE_AXIS_1 B_AXIS
|
||||
#define CORE_AXIS_2 C_AXIS
|
||||
#endif
|
||||
#if ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY)
|
||||
#if ANY(COREYX, COREZX, COREZY)
|
||||
#define CORESIGN(n) (-(n))
|
||||
#else
|
||||
#define CORESIGN(n) (n)
|
||||
@ -426,7 +426,7 @@
|
||||
#define HEATER_CHAMBER_USES_THERMISTOR
|
||||
#endif
|
||||
|
||||
#define HOTEND_USES_THERMISTOR (ENABLED(HEATER_0_USES_THERMISTOR) || ENABLED(HEATER_1_USES_THERMISTOR) || ENABLED(HEATER_2_USES_THERMISTOR) || ENABLED(HEATER_3_USES_THERMISTOR) || ENABLED(HEATER_4_USES_THERMISTOR))
|
||||
#define HOTEND_USES_THERMISTOR ANY(HEATER_0_USES_THERMISTOR, HEATER_1_USES_THERMISTOR, HEATER_2_USES_THERMISTOR, HEATER_3_USES_THERMISTOR, HEATER_4_USES_THERMISTOR)
|
||||
|
||||
/**
|
||||
* Default hotend offsets, if not defined
|
||||
@ -877,8 +877,8 @@
|
||||
#define AXIS_HAS_STALLGUARD(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2660) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160))
|
||||
#define AXIS_HAS_STEALTHCHOP(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2208) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160))
|
||||
|
||||
#define STEALTHCHOP_ENABLED (ENABLED(STEALTHCHOP_XY) || ENABLED(STEALTHCHOP_Z) || ENABLED(STEALTHCHOP_E))
|
||||
#define USE_SENSORLESS (ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING))
|
||||
#define STEALTHCHOP_ENABLED ANY(STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_E)
|
||||
#define USE_SENSORLESS EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
|
||||
// Disable Z axis sensorless homing if a probe is used to home the Z axis
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
#undef Z_STALL_SENSITIVITY
|
||||
@ -940,8 +940,8 @@
|
||||
#if !HAS_HEATED_BED
|
||||
#undef PIDTEMPBED
|
||||
#endif
|
||||
#define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED))
|
||||
#define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED))
|
||||
#define HAS_PID_HEATING EITHER(PIDTEMP, PIDTEMPBED)
|
||||
#define HAS_PID_FOR_BOTH BOTH(PIDTEMP, PIDTEMPBED)
|
||||
|
||||
// Thermal protection
|
||||
#define HAS_THERMALLY_PROTECTED_BED (HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED))
|
||||
@ -976,9 +976,9 @@
|
||||
#define Z_PROBE_SERVO_NR -1
|
||||
#endif
|
||||
|
||||
#define HAS_SERVO_ANGLES (ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE) || (HAS_Z_SERVO_PROBE && defined(Z_PROBE_SERVO_NR)))
|
||||
#define HAS_SERVO_ANGLES (EITHER(SWITCHING_EXTRUDER, SWITCHING_NOZZLE) || (HAS_Z_SERVO_PROBE && defined(Z_PROBE_SERVO_NR)))
|
||||
|
||||
#if !HAS_SERVO_ANGLES
|
||||
#if !HAS_SERVO_ANGLES || ENABLED(BLTOUCH)
|
||||
#undef EDITABLE_SERVO_ANGLES
|
||||
#endif
|
||||
|
||||
@ -986,17 +986,17 @@
|
||||
#define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
|
||||
|
||||
// User Interface
|
||||
#define HAS_HOME (PIN_EXISTS(HOME))
|
||||
#define HAS_KILL (PIN_EXISTS(KILL))
|
||||
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
|
||||
#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
|
||||
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
|
||||
#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE))
|
||||
#define HAS_HOME (PIN_EXISTS(HOME))
|
||||
#define HAS_KILL (PIN_EXISTS(KILL))
|
||||
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
|
||||
#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
|
||||
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
|
||||
#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE))
|
||||
|
||||
// Digital control
|
||||
#define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
|
||||
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
|
||||
#define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_X) || PIN_EXISTS(MOTOR_CURRENT_PWM_Y) || PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
|
||||
#define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
|
||||
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
|
||||
#define HAS_MOTOR_CURRENT_PWM ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_E)
|
||||
|
||||
#define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_X2_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Y2_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_Z2_MICROSTEPS || HAS_Z3_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS || HAS_E5_MICROSTEPS)
|
||||
|
||||
@ -1055,7 +1055,7 @@
|
||||
#undef AUTO_REPORT_TEMPERATURES
|
||||
#endif
|
||||
|
||||
#define HAS_AUTO_REPORTING (ENABLED(AUTO_REPORT_TEMPERATURES) || ENABLED(AUTO_REPORT_SD_STATUS))
|
||||
#define HAS_AUTO_REPORTING EITHER(AUTO_REPORT_TEMPERATURES, AUTO_REPORT_SD_STATUS)
|
||||
|
||||
/**
|
||||
* This setting is also used by M109 when trying to calculate
|
||||
@ -1272,14 +1272,14 @@
|
||||
/**
|
||||
* Set granular options based on the specific type of leveling
|
||||
*/
|
||||
#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA)))
|
||||
#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
|
||||
#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
|
||||
#define UBL_SEGMENTED BOTH(AUTO_BED_LEVELING_UBL, DELTA)
|
||||
#define ABL_PLANAR EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
|
||||
#define ABL_GRID EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
|
||||
#define HAS_ABL_NOT_UBL (ABL_PLANAR || ABL_GRID)
|
||||
#define HAS_ABL_OR_UBL (HAS_ABL_NOT_UBL || ENABLED(AUTO_BED_LEVELING_UBL))
|
||||
#define HAS_LEVELING (HAS_ABL_OR_UBL || ENABLED(MESH_BED_LEVELING))
|
||||
#define HAS_AUTOLEVEL (HAS_ABL_OR_UBL && DISABLED(PROBE_MANUALLY))
|
||||
#define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING))
|
||||
#define HAS_MESH ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING)
|
||||
#define PLANNER_LEVELING (HAS_LEVELING && DISABLED(AUTO_BED_LEVELING_UBL))
|
||||
#define HAS_PROBING_PROCEDURE (HAS_ABL_OR_UBL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
|
||||
#define HAS_POSITION_MODIFIERS (ENABLED(FWRETRACT) || HAS_LEVELING || ENABLED(SKEW_CORRECTION))
|
||||
@ -1297,8 +1297,8 @@
|
||||
#undef NO_FAN_SLOWING_IN_PID_TUNING
|
||||
#endif
|
||||
|
||||
#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
|
||||
#define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
|
||||
#define QUIET_PROBING (HAS_BED_PROBE && (EITHER(PROBING_HEATERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
|
||||
#define HEATER_IDLE_HANDLER EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF)
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH)
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0
|
||||
@ -1400,7 +1400,7 @@
|
||||
/**
|
||||
* Default mesh area is an area with an inset margin on the print area.
|
||||
*/
|
||||
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
||||
#if IS_KINEMATIC
|
||||
// Probing points may be verified at compile time within the radius
|
||||
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
|
||||
@ -1440,7 +1440,7 @@
|
||||
|
||||
#endif // MESH_BED_LEVELING || AUTO_BED_LEVELING_UBL
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_3POINT)
|
||||
#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT)
|
||||
#if IS_KINEMATIC
|
||||
#define SIN0 0.0
|
||||
#define SIN120 0.866025
|
||||
@ -1488,7 +1488,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
|
||||
#ifndef LEFT_PROBE_BED_POSITION
|
||||
#define LEFT_PROBE_BED_POSITION MIN_PROBE_X
|
||||
#endif
|
||||
@ -1582,7 +1582,7 @@
|
||||
#endif
|
||||
|
||||
// Add commands that need sub-codes to this list
|
||||
#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS) || ENABLED(POWER_LOSS_RECOVERY)
|
||||
#define USE_GCODE_SUBCODES ANY(G38_PROBE_TARGET, CNC_COORDINATE_SYSTEMS, POWER_LOSS_RECOVERY)
|
||||
|
||||
// Parking Extruder
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
@ -1624,8 +1624,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Nozzle park
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE) && ENABLED(DELTA)
|
||||
// Nozzle park for Delta
|
||||
#if BOTH(NOZZLE_PARK_FEATURE, DELTA)
|
||||
#undef NOZZLE_PARK_Z_FEEDRATE
|
||||
#define NOZZLE_PARK_Z_FEEDRATE NOZZLE_PARK_XY_FEEDRATE
|
||||
#endif
|
||||
@ -1666,7 +1666,7 @@
|
||||
// If platform requires early initialization of watchdog to properly boot
|
||||
#define EARLY_WATCHDOG (ENABLED(USE_WATCHDOG) && defined(ARDUINO_ARCH_SAM))
|
||||
|
||||
#define USE_EXECUTE_COMMANDS_IMMEDIATE (ENABLED(G29_RETRY_AND_RECOVER) || ENABLED(GCODE_MACROS) || ENABLED(POWER_LOSS_RECOVERY) || HAS_DRIVER(L6470))
|
||||
#define USE_EXECUTE_COMMANDS_IMMEDIATE (ANY(G29_RETRY_AND_RECOVER, GCODE_MACROS, POWER_LOSS_RECOVERY) || HAS_DRIVER(L6470))
|
||||
|
||||
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
|
||||
#define Z_STEPPER_COUNT 3
|
||||
|
@ -395,7 +395,7 @@
|
||||
#elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
|
||||
#error "TX_BUFFER_SIZE must be 0 or a power of 2 between 1 and 256."
|
||||
#endif
|
||||
#elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
#elif ANY(SERIAL_XON_XOFF, SERIAL_STATS_MAX_RX_QUEUED, SERIAL_STATS_DROPPED_RX)
|
||||
#error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
|
||||
#endif
|
||||
|
||||
@ -410,7 +410,7 @@
|
||||
/**
|
||||
* Dual / Triple Stepper Drivers
|
||||
*/
|
||||
#if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
|
||||
#if BOTH(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE)
|
||||
#error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
|
||||
#elif ENABLED(X_DUAL_STEPPER_DRIVERS) && !(HAS_X2_ENABLE && HAS_X2_STEP && HAS_X2_DIR)
|
||||
#error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
|
||||
@ -462,21 +462,21 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "PULLDOWN pin mode is not available on the selected board."
|
||||
#endif
|
||||
|
||||
#if ENABLED(ENDSTOPPULLUPS) && ENABLED(ENDSTOPPULLDOWNS)
|
||||
#if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS)
|
||||
#error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS."
|
||||
#elif ENABLED(FIL_RUNOUT_PULLUP) && ENABLED(FIL_RUNOUT_PULLDOWN)
|
||||
#elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN)
|
||||
#error "Enable only one of FIL_RUNOUT_PULLUP or FIL_RUNOUT_PULLDOWN."
|
||||
#elif ENABLED(ENDSTOPPULLUP_XMAX) && ENABLED(ENDSTOPPULLDOWN_XMAX)
|
||||
#elif BOTH(ENDSTOPPULLUP_XMAX, ENDSTOPPULLDOWN_XMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_X_MAX or ENDSTOPPULLDOWN_X_MAX."
|
||||
#elif ENABLED(ENDSTOPPULLUP_YMAX) && ENABLED(ENDSTOPPULLDOWN_YMAX)
|
||||
#elif BOTH(ENDSTOPPULLUP_YMAX, ENDSTOPPULLDOWN_YMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_Y_MAX or ENDSTOPPULLDOWN_Y_MAX."
|
||||
#elif ENABLED(ENDSTOPPULLUP_ZMAX) && ENABLED(ENDSTOPPULLDOWN_ZMAX)
|
||||
#elif BOTH(ENDSTOPPULLUP_ZMAX, ENDSTOPPULLDOWN_ZMAX)
|
||||
#error "Enable only one of ENDSTOPPULLUP_Z_MAX or ENDSTOPPULLDOWN_Z_MAX."
|
||||
#elif ENABLED(ENDSTOPPULLUP_XMIN) && ENABLED(ENDSTOPPULLDOWN_XMIN)
|
||||
#elif BOTH(ENDSTOPPULLUP_XMIN, ENDSTOPPULLDOWN_XMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_X_MIN or ENDSTOPPULLDOWN_X_MIN."
|
||||
#elif ENABLED(ENDSTOPPULLUP_YMIN) && ENABLED(ENDSTOPPULLDOWN_YMIN)
|
||||
#elif BOTH(ENDSTOPPULLUP_YMIN, ENDSTOPPULLDOWN_YMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN."
|
||||
#elif ENABLED(ENDSTOPPULLUP_ZMIN) && ENABLED(ENDSTOPPULLDOWN_ZMIN)
|
||||
#elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN)
|
||||
#error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN."
|
||||
#endif
|
||||
|
||||
@ -513,7 +513,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Custom Boot and Status screens
|
||||
*/
|
||||
#if DISABLED(DOGLCD) && (ENABLED(SHOW_CUSTOM_BOOTSCREEN) || ENABLED(CUSTOM_STATUS_SCREEN_IMAGE))
|
||||
#if DISABLED(DOGLCD) && EITHER(SHOW_CUSTOM_BOOTSCREEN, CUSTOM_STATUS_SCREEN_IMAGE)
|
||||
#error "Graphical LCD is required for SHOW_CUSTOM_BOOTSCREEN and CUSTOM_STATUS_SCREEN_IMAGE."
|
||||
#endif
|
||||
|
||||
@ -568,9 +568,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
#if ENABLED(SCARA)
|
||||
#error "BABYSTEPPING is not implemented for SCARA yet."
|
||||
#elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
|
||||
#elif BOTH(DELTA, BABYSTEP_XY)
|
||||
#error "BABYSTEPPING only implemented for Z axis on deltabots."
|
||||
#elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && ENABLED(MESH_BED_LEVELING)
|
||||
#elif BOTH(BABYSTEP_ZPROBE_OFFSET, MESH_BED_LEVELING)
|
||||
#error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination"
|
||||
#elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
|
||||
#error "BABYSTEP_ZPROBE_OFFSET requires a probe."
|
||||
@ -580,7 +580,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
|
||||
#elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET
|
||||
#error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
|
||||
#elif ENABLED(BABYSTEP_ALWAYS_AVAILABLE) && ENABLED(MOVE_Z_WHEN_IDLE)
|
||||
#elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
|
||||
#error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible."
|
||||
#endif
|
||||
#endif
|
||||
@ -641,7 +641,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Individual axis homing is useless for DELTAS
|
||||
*/
|
||||
#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA)
|
||||
#if BOTH(INDIVIDUAL_AXIS_HOMING_MENU, DELTA)
|
||||
#error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics."
|
||||
#endif
|
||||
|
||||
@ -810,7 +810,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "Enable only one of PARKING_EXTRUDER and MAGNETIC_PARKING_EXTRUDER."
|
||||
#elif EXTRUDERS != 2
|
||||
#error "PARKING_EXTRUDER requires exactly 2 EXTRUDERS."
|
||||
#elif !PIN_EXISTS(SOL0) || !PIN_EXISTS(SOL1)
|
||||
#elif !PIN_EXISTS(SOL0, SOL1)
|
||||
#error "PARKING_EXTRUDER requires SOL0_PIN and SOL1_PIN."
|
||||
#elif !defined(PARKING_EXTRUDER_PARKING_X)
|
||||
#error "PARKING_EXTRUDER requires PARKING_EXTRUDER_PARKING_X."
|
||||
@ -907,7 +907,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Bed Heating Options - PID vs Limit Switching
|
||||
*/
|
||||
#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING)
|
||||
#if BOTH(PIDTEMPBED, BED_LIMIT_SWITCHING)
|
||||
#error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
|
||||
#endif
|
||||
|
||||
@ -974,7 +974,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Z_PROBE_SLED is incompatible with DELTA
|
||||
*/
|
||||
#if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA)
|
||||
#if BOTH(Z_PROBE_SLED, DELTA)
|
||||
#error "You cannot use Z_PROBE_SLED with DELTA."
|
||||
#endif
|
||||
|
||||
@ -1087,7 +1087,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
* Bed Leveling Requirements
|
||||
*/
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(AUTO_BED_LEVELING_3POINT)
|
||||
#if EITHER(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_3POINT)
|
||||
static_assert(WITHIN(PROBE_PT_1_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_1_X is outside the probe region.");
|
||||
static_assert(WITHIN(PROBE_PT_2_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_2_X is outside the probe region.");
|
||||
static_assert(WITHIN(PROBE_PT_3_X, MIN_PROBE_X, MAX_PROBE_X), "PROBE_PT_3_X is outside the probe region.");
|
||||
@ -1221,8 +1221,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Make sure DISABLE_[XYZ] compatible with selected homing options
|
||||
*/
|
||||
#if ENABLED(DISABLE_X) || ENABLED(DISABLE_Y) || ENABLED(DISABLE_Z)
|
||||
#if ENABLED(HOME_AFTER_DEACTIVATE) || ENABLED(Z_SAFE_HOMING)
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z)
|
||||
#if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING)
|
||||
#error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING."
|
||||
#endif
|
||||
#endif
|
||||
@ -1255,7 +1255,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if ENABLED(SAV_3DGLCD)
|
||||
#if DISABLED(U8GLIB_SSD1306) && DISABLED(U8GLIB_SH1106)
|
||||
#error "Enable a SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
|
||||
#elif ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106)
|
||||
#elif BOTH(U8GLIB_SSD1306, U8GLIB_SH1106)
|
||||
#error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106."
|
||||
#endif
|
||||
#endif
|
||||
@ -1334,11 +1334,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
*/
|
||||
#if !HAS_HEATER_0
|
||||
#error "HEATER_0_PIN not defined for this board."
|
||||
#elif !PIN_EXISTS(TEMP_0) && !PIN_EXISTS(MAX6675_SS)
|
||||
#elif !ANY_PIN(TEMP_0, MAX6675_SS)
|
||||
#error "TEMP_0_PIN not defined for this board."
|
||||
#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR)))
|
||||
#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PIN_EXISTS(E0_STEP, E0_DIR))
|
||||
#error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
|
||||
#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !HAS_E0_ENABLE))
|
||||
#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP, E0_DIR) || !HAS_E0_ENABLE))
|
||||
#error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
|
||||
#elif TEMP_SENSOR_0 == 0
|
||||
#error "TEMP_SENSOR_0 is required."
|
||||
@ -1356,7 +1356,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board."
|
||||
#elif TEMP_SENSOR_1 == 0
|
||||
#error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
|
||||
#elif !PIN_EXISTS(TEMP_1) && !PIN_EXISTS(MAX6675_SS2)
|
||||
#elif !ANY_PIN(TEMP_1, MAX6675_SS2)
|
||||
#error "TEMP_1_PIN not defined for this board."
|
||||
#endif
|
||||
#if HOTENDS > 2
|
||||
@ -1434,7 +1434,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Temperature status LEDs
|
||||
*/
|
||||
#if ENABLED(TEMP_STAT_LEDS) && !PIN_EXISTS(STAT_LED_RED) && !PIN_EXISTS(STAT_LED_BLUE)
|
||||
#if ENABLED(TEMP_STAT_LEDS) && !ANY_PIN(STAT_LED_RED, STAT_LED_BLUE)
|
||||
#error "TEMP_STAT_LEDS requires STAT_LED_RED_PIN or STAT_LED_BLUE_PIN, preferably both."
|
||||
#endif
|
||||
|
||||
@ -1442,7 +1442,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
* LED Control Menu
|
||||
*/
|
||||
#if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
|
||||
#error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9632, or NEOPIXEL_LED."
|
||||
#error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1467,27 +1467,27 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
*/
|
||||
#if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
|
||||
#if E_STEPPERS
|
||||
#if !(PIN_EXISTS(E0_STEP) && PIN_EXISTS(E0_DIR) && HAS_E0_ENABLE)
|
||||
#if !(PIN_EXISTS(E0_STEP, E0_DIR) && HAS_E0_ENABLE)
|
||||
#error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
|
||||
#endif
|
||||
#if E_STEPPERS > 1
|
||||
#if !(PIN_EXISTS(E1_STEP) && PIN_EXISTS(E1_DIR) && HAS_E1_ENABLE)
|
||||
#if !(PIN_EXISTS(E1_STEP, E1_DIR) && HAS_E1_ENABLE)
|
||||
#error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
|
||||
#endif
|
||||
#if E_STEPPERS > 2
|
||||
#if !(PIN_EXISTS(E2_STEP) && PIN_EXISTS(E2_DIR) && HAS_E2_ENABLE)
|
||||
#if !(PIN_EXISTS(E2_STEP, E2_DIR) && HAS_E2_ENABLE)
|
||||
#error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
|
||||
#endif
|
||||
#if E_STEPPERS > 3
|
||||
#if !(PIN_EXISTS(E3_STEP) && PIN_EXISTS(E3_DIR) && HAS_E3_ENABLE)
|
||||
#if !(PIN_EXISTS(E3_STEP, E3_DIR) && HAS_E3_ENABLE)
|
||||
#error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
|
||||
#endif
|
||||
#if E_STEPPERS > 4
|
||||
#if !(PIN_EXISTS(E4_STEP) && PIN_EXISTS(E4_DIR) && HAS_E4_ENABLE)
|
||||
#if !(PIN_EXISTS(E4_STEP, E4_DIR) && HAS_E4_ENABLE)
|
||||
#error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
|
||||
#endif
|
||||
#if E_STEPPERS > 5
|
||||
#if !(PIN_EXISTS(E5_STEP) && PIN_EXISTS(E5_DIR) && HAS_E5_ENABLE)
|
||||
#if !(PIN_EXISTS(E5_STEP, E5_DIR) && HAS_E5_ENABLE)
|
||||
#error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
|
||||
#endif
|
||||
#endif // E_STEPPERS > 5
|
||||
@ -1675,9 +1675,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* RGB_LED Requirements
|
||||
*/
|
||||
#define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B))
|
||||
#define _RGB_TEST (PIN_EXISTS(RGB_LED_R, RGB_LED_G, RGB_LED_B))
|
||||
#if ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS
|
||||
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
|
||||
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9533, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
|
||||
#elif ENABLED(RGB_LED)
|
||||
#if !_RGB_TEST
|
||||
#error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
|
||||
@ -1813,7 +1813,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* Check existing RX/TX pins against enable TMC UART drivers.
|
||||
*/
|
||||
#define INVALID_TMC2208(ST) (AXIS_DRIVER_TYPE(ST, TMC2208) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX) && PIN_EXISTS(ST##_SERIAL_TX))))
|
||||
#define INVALID_TMC2208(ST) (AXIS_DRIVER_TYPE(ST, TMC2208) && !(defined(ST##_HARDWARE_SERIAL) || (PIN_EXISTS(ST##_SERIAL_RX, ST##_SERIAL_TX))))
|
||||
#if INVALID_TMC2208(X)
|
||||
#error "TMC2208 on X requires X_HARDWARE_SERIAL or X_SERIAL_(RX|TX)_PIN."
|
||||
#elif INVALID_TMC2208(X2)
|
||||
@ -1887,7 +1887,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
// is necessary in order to reset the stallGuard indication between the initial movement of all three
|
||||
// towers to +Z and the individual homing of each tower. This restriction can be removed once a means of
|
||||
// clearing the stallGuard activated status is found.
|
||||
#if ENABLED(DELTA) && !(ENABLED(STEALTHCHOP_XY) && ENABLED(STEALTHCHOP_Z))
|
||||
#if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z)
|
||||
#error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z."
|
||||
#elif X_SENSORLESS && X_HOME_DIR == -1 && (!X_MIN_ENDSTOP_INVERTING || DISABLED(ENDSTOPPULLUP_XMIN))
|
||||
#error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING and ENDSTOPPULLUP_XMIN when homing to X_MIN."
|
||||
@ -1909,7 +1909,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
// Sensorless homing/probing requirements
|
||||
#if ENABLED(SENSORLESS_HOMING) && !(X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS)
|
||||
#error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, or Z axes."
|
||||
#elif ENABLED(SENSORLESS_PROBING) && ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
|
||||
#elif BOTH(SENSORLESS_PROBING, DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
|
||||
#error "SENSORLESS_PROBING for DELTA requires TMC stepper drivers with StallGuard on X, Y, and Z axes."
|
||||
#elif ENABLED(SENSORLESS_PROBING) && !Z_SENSORLESS
|
||||
#error "SENSORLESS_PROBING requires a TMC stepper driver with StallGuard on Z."
|
||||
@ -1981,7 +1981,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||
|
||||
#undef _ARR_TEST
|
||||
|
||||
#if ENABLED(CNC_COORDINATE_SYSTEMS) && ENABLED(NO_WORKSPACE_OFFSETS)
|
||||
#if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS)
|
||||
#error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS."
|
||||
#endif
|
||||
|
||||
@ -2036,7 +2036,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||
#error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration."
|
||||
#endif
|
||||
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !(PIN_EXISTS(USB_CS) && PIN_EXISTS(USB_INTR))
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && !PIN_EXISTS(USB_CS, USB_INTR)
|
||||
#error "USB_CS_PIN and USB_INTR_PIN are required for USB_FLASH_DRIVE_SUPPORT."
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user