diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 18a3defd8..88bcec511 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -368,6 +368,21 @@ #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS) #endif //!MANUAL_HOME_POSITIONS + /** + * The BLTouch Probe emulates a servo probe + */ + #if ENABLED(BLTOUCH) + #undef Z_ENDSTOP_SERVO_NR + #undef Z_SERVO_ANGLES + #define Z_ENDSTOP_SERVO_NR 0 + #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract + #undef DEACTIVATE_SERVOS_AFTER_MOVE + #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #undef Z_MIN_ENDSTOP_INVERTING + #define Z_MIN_ENDSTOP_INVERTING false + #endif + #endif + /** * Auto Bed Leveling and Z Probe Repeatability Test */ diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 10173f97e..aa5c3be87 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -465,6 +465,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 07172d608..cceaf1ad0 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -465,6 +465,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 0951d1b9a..e55dc3347 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -447,6 +447,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 78c7e5045..d2edb9a53 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -445,6 +445,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 60431e93a..72e65de65 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -457,6 +457,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index e70988552..18e9679a7 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -459,6 +459,9 @@ // its trigger-point if hardware endstops are active. #define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 289f16ce1..efcd1f858 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -482,6 +482,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index edf8466a8..316a2c078 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -442,6 +442,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 1e1e2ce9c..4024761c8 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -442,6 +442,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 158dc950c..3ac1feef4 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -465,6 +465,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index e97b60bfa..b1ec73669 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -462,6 +462,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index fecfa0515..e538ff010 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -473,6 +473,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 1509de3a0..201dcadf9 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -486,6 +486,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 5470f361e..b5eba2cfb 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -457,6 +457,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 59f37347e..707146f0a 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -465,6 +465,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index c916957db..7b9e5e516 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -507,6 +507,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index a27eab203..8790185e1 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -507,6 +507,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index aabf9a8e1..d677ea174 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -507,6 +507,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 5c390a573..41d48fc77 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -496,6 +496,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index df483309a..5ac9c8c84 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -505,6 +505,9 @@ // its trigger-point if hardware endstops are active. #define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index c3d6cb8c8..421683f31 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -468,6 +468,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index d2bbc6c70..0499e024b 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -455,6 +455,9 @@ // its trigger-point if hardware endstops are active. //#define FIX_MOUNTED_PROBE +// The BLTouch probe emulates a servo probe. +//#define BLTOUCH + // Z Servo Probe, such as an endstop switch on a rotating arm. //#define Z_ENDSTOP_SERVO_NR 0 //#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 63159a304..90a1ddf65 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -359,11 +359,11 @@ void Stepper::isr() { if (current_block) { // Update endstops state, if enabled - #if HAS_BED_PROBE - if (endstops.enabled || endstops.z_probe_enabled) endstops.update(); - #else - if (endstops.enabled) endstops.update(); - #endif + if (endstops.enabled + #if HAS_BED_PROBE + || endstops.z_probe_enabled + #endif + ) endstops.update(); // Take multiple steps per interrupt (For high speed moves) for (int8_t i = 0; i < step_loops; i++) {