diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 18a3defd81..88bcec5116 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 10173f97e7..aa5c3be873 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 07172d6084..cceaf1ad01 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 0951d1b9ae..e55dc3347a 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 78c7e5045f..d2edb9a531 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 60431e93aa..72e65de652 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 e70988552d..18e9679a73 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 289f16ce1c..efcd1f8589 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 edf8466a82..316a2c0781 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 1e1e2ce9ca..4024761c8e 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 158dc950cc..3ac1feef49 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 e97b60bfa2..b1ec73669d 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 fecfa05153..e538ff010c 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 1509de3a0c..201dcadf9f 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 5470f361e3..b5eba2cfb1 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 59f37347ed..707146f0a3 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 c916957db5..7b9e5e5163 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 a27eab2035..8790185e1a 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 aabf9a8e15..d677ea1743 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 5c390a5730..41d48fc77e 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 df483309a4..5ac9c8c84c 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 c3d6cb8c83..421683f31b 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 d2bbc6c708..0499e024b5 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 63159a3046..90a1ddf65d 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++) {