From 176b9627c7c3235fc344236c906c6884a63d48ef Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 1 Jun 2016 01:15:37 -0700 Subject: [PATCH 1/2] Some cleanup ahead of BLTOUCH support --- Marlin/stepper.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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++) { From 1583177ef4dad2eb29b030a43131e98be833110b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 17 Jul 2016 13:14:12 -0700 Subject: [PATCH 2/2] BLTOUCH probe config option --- Marlin/Conditionals.h | 15 +++++++++++++++ Marlin/Configuration.h | 3 +++ .../Cartesio/Configuration.h | 3 +++ .../example_configurations/Felix/Configuration.h | 3 +++ .../Felix/DUAL/Configuration.h | 3 +++ .../Hephestos/Configuration.h | 3 +++ .../Hephestos_2/Configuration.h | 3 +++ .../example_configurations/K8200/Configuration.h | 3 +++ .../example_configurations/K8400/Configuration.h | 3 +++ .../K8400/Dual-head/Configuration.h | 3 +++ .../RepRapWorld/Megatronics/Configuration.h | 3 +++ .../RigidBot/Configuration.h | 3 +++ .../example_configurations/SCARA/Configuration.h | 3 +++ .../example_configurations/TAZ4/Configuration.h | 3 +++ .../example_configurations/WITBOX/Configuration.h | 3 +++ .../adafruit/ST7565/Configuration.h | 3 +++ .../delta/biv2.5/Configuration.h | 3 +++ .../delta/generic/Configuration.h | 3 +++ .../delta/kossel_mini/Configuration.h | 3 +++ .../delta/kossel_pro/Configuration.h | 3 +++ .../delta/kossel_xl/Configuration.h | 3 +++ .../makibox/Configuration.h | 3 +++ .../tvrrug/Round2/Configuration.h | 3 +++ 23 files changed, 81 insertions(+) diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index a70c449237..1ab37d4534 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 0a6d774171..ea55ac37b6 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -465,6 +465,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 5d23fb5373..6571b73918 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -465,6 +465,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 2bb499f0c9..89689618e4 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -447,6 +447,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 5fc495f246..bdf7faf7d1 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -445,6 +445,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 fa58bb394e..4f2d4ea880 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -457,6 +457,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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 ebdd18cb38..d8c679ef51 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -459,6 +459,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 c20173daf7..c6fb40ad9a 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -482,6 +482,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 e9e7a6b54d..c213480abd 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -442,6 +442,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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 48f7f6008d..79cfae3852 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -442,6 +442,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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 11a5a07f71..52ec100abc 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -465,6 +465,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 c080bd9fc8..aadc23dacc 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -462,6 +462,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 7a9f0d37c0..1c0aac1c3c 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -473,6 +473,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 f51bc4841e..6f80c22821 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -486,6 +486,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 5abe59e1cf..412549bf9d 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -457,6 +457,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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 9f3fa954a0..4f99be9aee 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -465,6 +465,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 d599e9a508..a3e28ebe6f 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -507,6 +507,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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 cf5e08126b..a7c58d9921 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -507,6 +507,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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 f2fdc54b04..017cf245ef 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -507,6 +507,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 aca8ede55d..089f7df32a 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -496,6 +496,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 b59312fce7..df95a42e77 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -505,6 +505,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 4d05e5cb78..a521d88710 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -468,6 +468,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // 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 787de288b7..b73bb8c48c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -455,6 +455,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // 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