diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 775f6a04f0..dd2d6ed748 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -622,7 +622,9 @@ #endif // Fallback Stepper Driver types that depend on Configuration_adv.h -#if NONE(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) +#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) + #define HAS_X2_STEPPER 1 +#else #undef X2_DRIVER_TYPE #endif #if DISABLED(Y_DUAL_STEPPER_DRIVERS) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 649f0d5d23..a54bf53c49 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2614,7 +2614,7 @@ void Stepper::init() { #if HAS_X_ENABLE X_ENABLE_INIT(); if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH); - #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) && HAS_X2_ENABLE + #if BOTH(HAS_X2_STEPPER, HAS_X2_ENABLE) X2_ENABLE_INIT(); if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH); #endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 869541e3ba..2f627ddc36 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -579,12 +579,12 @@ #endif // The X2 axis, if any, should be the next open extruder port -#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) && !defined(X2_DIAG_PIN) && !defined(X2_STEP_PIN) && !PIN_EXISTS(X2_CS_PIN) +#if HAS_X2_STEPPER && !defined(X2_DIAG_PIN) && !defined(X2_STEP_PIN) && !PIN_EXISTS(X2_CS_PIN) #define Y2_E_INDEX INCREMENT(X2_E_INDEX) #else #define Y2_E_INDEX X2_E_INDEX #endif -#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) +#if HAS_X2_STEPPER #ifndef X2_STEP_PIN #define X2_STEP_PIN _EPIN(X2_E_INDEX, STEP) #define X2_DIR_PIN _EPIN(X2_E_INDEX, DIR) diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h index 843eadb432..4fb10bfd35 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h @@ -66,3 +66,9 @@ #if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && (CASE_LIGHT_PIN == SPINDLE_LASER_ENA_PIN || CASE_LIGHT_PIN == SPINDLE_LASER_PWM_PIN) #error "CASE_LIGHT_PIN conflicts with a Spindle / Laser pin." #endif + +#if HAS_MARLINUI_U8GLIB + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 +#endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index c953cff3d0..79ac308ce7 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -100,9 +100,15 @@ #define E1_CS_PIN 44 #endif -#define E2_STEP_PIN 42 -#define E2_DIR_PIN 43 -#define E2_ENABLE_PIN 44 +#if HAS_X2_STEPPER + #define X2_STEP_PIN 42 + #define X2_DIR_PIN 43 + #define X2_ENABLE_PIN 44 +#else + #define E2_STEP_PIN 42 + #define E2_DIR_PIN 43 + #define E2_ENABLE_PIN 44 +#endif // // Temperature Sensors @@ -174,3 +180,9 @@ #define BEEPER_PIN 37 #endif #endif + +#if HAS_MARLINUI_U8GLIB + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 +#endif diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index 7ccb0339b2..5f2bd0467e 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -632,7 +632,7 @@ // Chip Select and Digital Micro-stepping // -#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) +#if HAS_X2_STEPPER #if PIN_EXISTS(X2_CS) && AXIS_HAS_SPI(X2) #define _X2_CS X2_CS_PIN, #else