From 0c2aa92b079acdcdf5ac9d309e1d4eaf9f7f3305 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 20 Apr 2016 17:04:52 -0700 Subject: [PATCH] Z Safe Homing for all The `Z_SAFE_HOMING` feature is coupled with probes and not leveling, so make it available for general use. --- Marlin/Configuration.h | 33 ++++++++++--------- .../Felix/Configuration.h | 32 +++++++++--------- .../Felix/Configuration_DUAL.h | 32 +++++++++--------- .../Hephestos/Configuration.h | 32 +++++++++--------- .../Hephestos_2/Configuration.h | 32 +++++++++--------- .../K8200/Configuration.h | 32 +++++++++--------- .../RepRapWorld/Megatronics/Configuration.h | 32 +++++++++--------- .../RigidBot/Configuration.h | 32 +++++++++--------- .../SCARA/Configuration.h | 32 +++++++++--------- .../TAZ4/Configuration.h | 32 +++++++++--------- .../WITBOX/Configuration.h | 32 +++++++++--------- .../adafruit/ST7565/Configuration.h | 32 +++++++++--------- .../delta/biv2.5/Configuration.h | 32 +++++++++--------- .../delta/generic/Configuration.h | 32 +++++++++--------- .../delta/kossel_mini/Configuration.h | 32 +++++++++--------- .../delta/kossel_pro/Configuration.h | 32 +++++++++--------- .../delta/kossel_xl/Configuration.h | 32 +++++++++--------- .../makibox/Configuration.h | 32 +++++++++--------- .../tvrrug/Round2/Configuration.h | 32 +++++++++--------- 19 files changed, 305 insertions(+), 304 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index cf1c5cd21..97add8a21 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -637,22 +637,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -672,6 +657,22 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + + // @section movement /** diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 7ed915fd0..11488685e 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -619,22 +619,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -654,6 +639,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index f463080aa..c5113004c 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -616,22 +616,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -651,6 +636,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 466aa34ab..adf056e6a 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -629,22 +629,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -664,6 +649,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 8f9c51be5..866556d6a 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -631,22 +631,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -666,6 +651,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 62505a9cb..4480757fe 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -654,22 +654,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -689,6 +674,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 0b529ebf7..b8bbfe459 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -637,22 +637,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -672,6 +657,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 03fd7e557..f147f7caf 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -631,22 +631,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -666,6 +651,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 7a036264d..8fc4e22cc 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -645,22 +645,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - //#define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -680,6 +665,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MANUAL_Z_HOME_POS 0.1 // Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index cde38d869..3f68ad16b 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -658,22 +658,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -693,6 +678,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index d56ba28ef..79469c788 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -629,22 +629,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -664,6 +649,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 07135c6ad..34933b774 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -637,22 +637,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -672,6 +657,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index ee10b5105..561b0acdf 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -764,22 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #endif // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -798,6 +783,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MANUAL_Z_HOME_POS 405 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index bb499ff0a..1ccee086b 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -764,22 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #endif // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -798,6 +783,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index f98ac20c0..c3e3e3c40 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -768,22 +768,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #endif // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -802,6 +787,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MANUAL_Z_HOME_POS 250 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 5cd40776e..372183972 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -755,22 +755,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #endif // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -789,6 +774,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MANUAL_Z_HOME_POS 277 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 35517ad5e..483aa78a8 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -762,22 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #endif // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - // #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -796,6 +781,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l #define MANUAL_Z_HOME_POS 381.4 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 49f2c8e50..2f5cfce4f 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -640,22 +640,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -675,6 +660,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /** diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index b9657c3e1..514fbef33 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -627,22 +627,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define MECHANICAL_PROBE // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you leave Z_SAFE_HOMING enabled! - - #define Z_SAFE_HOMING // Use the z-min-probe for homing to z-min - not the z-min-endstop. - // This feature is meant to avoid Z homing with Z probe outside the bed area. - // When defined, it will: - // - Allow Z homing only after X and Y homing AND stepper drivers still enabled. - // - If stepper drivers timeout, it will need X and Y homing again before Z homing. - // - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28). - // - Block Z homing only when the Z probe is outside bed area. - - #if ENABLED(Z_SAFE_HOMING) - - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). - - #endif + // it is highly recommended you also enable Z_SAFE_HOMING below! #endif // AUTO_BED_LEVELING_FEATURE @@ -662,6 +647,21 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing. #endif +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Position the Z probe in a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). +#endif + // @section movement /**