From 153e240cddffa33bc80bc9b99729c50f53b4ace8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 19 Sep 2016 00:24:54 -0500 Subject: [PATCH] Probe conditionals to Conditionals_LCD.h --- Marlin/Conditionals_LCD.h | 27 +++++++++++++++++++++++++++ Marlin/Conditionals_post.h | 21 --------------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 5413cbd99..a3ee093b4 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -316,6 +316,33 @@ #define TOOL_E_INDEX current_block->active_extruder #endif + /** + * The BLTouch Probe emulates a servo probe + */ + #if ENABLED(BLTOUCH) + #ifndef Z_ENDSTOP_SERVO_NR + #define Z_ENDSTOP_SERVO_NR 0 + #endif + #ifndef NUM_SERVOS + #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1) + #endif + #undef Z_SERVO_ANGLES + #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 + + /** + * Set a flag for a servo probe + */ + #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) + + /** + * Set a flag for any enabled probe + */ #define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED)) #endif //CONDITIONALS_LCD_H diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 3f7730753..2ac1dfeb1 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -114,25 +114,6 @@ #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS) #endif - /** - * The BLTouch Probe emulates a servo probe - */ - #if ENABLED(BLTOUCH) - #ifndef Z_ENDSTOP_SERVO_NR - #define Z_ENDSTOP_SERVO_NR 0 - #endif - #ifndef NUM_SERVOS - #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1) - #endif - #undef Z_SERVO_ANGLES - #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 */ @@ -140,8 +121,6 @@ #define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)) - #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) - /** * Z Sled Probe requires Z_SAFE_HOMING */