diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 3ff131de2e59bc4b1cdedbde74a1dc77800a5b6a..f610e0df84a43c70317207908d49b5b37e0624a4 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -566,15 +566,6 @@ * Bed Probe dependencies */ #if HAS_BED_PROBE - #ifndef X_PROBE_OFFSET_FROM_EXTRUDER - #define X_PROBE_OFFSET_FROM_EXTRUDER 0 - #endif - #ifndef Y_PROBE_OFFSET_FROM_EXTRUDER - #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 - #endif - #ifndef Z_PROBE_OFFSET_FROM_EXTRUDER - #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 - #endif #ifndef Z_PROBE_OFFSET_RANGE_MIN #define Z_PROBE_OFFSET_RANGE_MIN -20 #endif @@ -593,6 +584,13 @@ #else #define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_PROBE_DEPLOY_STOW #endif + #else + #undef X_PROBE_OFFSET_FROM_EXTRUDER + #undef Y_PROBE_OFFSET_FROM_EXTRUDER + #undef Z_PROBE_OFFSET_FROM_EXTRUDER + #define X_PROBE_OFFSET_FROM_EXTRUDER 0 + #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 + #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 #endif /** diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8b5e3394cced6470ef97d99171b1ba02c8c3538a..53ff21143f2f9cf39fe447c4189a078853f8b648 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -735,7 +735,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 0c7dddd6a6973a62ef011d63ab8054e3de0eba82..1a3830ac8228835f91c20c2706e1e91c3728cb37 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3049,12 +3049,11 @@ inline void gcode_G28() { SYNC_PLAN_POSITION_KINEMATIC(); /** - * Set the Z probe (or just the nozzle) destination to the safe - * homing point + * Move the Z probe (or just the nozzle) to the safe homing point */ destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - (X_PROBE_OFFSET_FROM_EXTRUDER)); destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - (Y_PROBE_OFFSET_FROM_EXTRUDER)); - destination[Z_AXIS] = current_position[Z_AXIS]; //z is already at the right height + destination[Z_AXIS] = current_position[Z_AXIS]; // Z is already at the right height #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) { diff --git a/Marlin/SanityCheck.cpp b/Marlin/SanityCheck.cpp index 269c59ea8a4a6c36f5ac0c3ea88db08cac076cee..f3ef238b75e0ec9e7f4988833afcdca6a6ccce3c 100644 --- a/Marlin/SanityCheck.cpp +++ b/Marlin/SanityCheck.cpp @@ -340,8 +340,8 @@ #error "You must set Z_RAISE_BETWEEN_PROBINGS in your configuration." #elif Z_RAISE_PROBE_DEPLOY_STOW < 0 #error "Probes need Z_RAISE_PROBE_DEPLOY_STOW >= 0." - #elif Z_RAISE_BETWEEN_PROBINGS < 1 - #error "Probes need Z_RAISE_BETWEEN_PROBINGS >= 1." + #elif Z_RAISE_BETWEEN_PROBINGS < 0 + #error "Probes need Z_RAISE_BETWEEN_PROBINGS >= 0." #endif #else @@ -353,8 +353,6 @@ #error "AUTO_BED_LEVELING_FEATURE requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." #elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." - #elif ENABLED(Z_SAFE_HOMING) - #error "Z_SAFE_HOMING currently requires a probe." #endif #endif @@ -364,9 +362,17 @@ */ #if ENABLED(Z_SAFE_HOMING) #if Z_SAFE_HOMING_X_POINT < MIN_PROBE_X || Z_SAFE_HOMING_X_POINT > MAX_PROBE_X - #error "The given Z_SAFE_HOMING_X_POINT can't be reached by the Z probe." + #if HAS_BED_PROBE + #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe." + #else + #error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle." + #endif #elif Z_SAFE_HOMING_Y_POINT < MIN_PROBE_Y || Z_SAFE_HOMING_Y_POINT > MAX_PROBE_Y - #error "The given Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe." + #if HAS_BED_PROBE + #error "Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe." + #else + #error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle." + #endif #endif #endif // Z_SAFE_HOMING diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 2ac06d1e817a1b82e1ad650f2bc9fc1ab4b4c77d..751417eda4fedde60533344c5f3b4d913aa645c3 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -736,7 +736,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 7bd240eda26dc049ca11db70dd68519f94de6a4f..ac526d97efc100b7c3e6e2eeb7f473a63640a48d 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -718,7 +718,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 09a97f1e1d5d6774954fc3d226c5b22bbb9c49ae..9729be6160bbdd9ae87405fc9993c6881d9d574b 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -716,7 +716,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 47b72e461c2a2e660abce2b3736e3b393855c727..6883b4f7d29f358b785a95ddb95f40db0bdb2cc7 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -728,7 +728,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index a4eb3a30d40f1d1a4978ca528727f8fa3ad9af01..23d71364d3f66c6a375bc56ce1a722e7265a62dd 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -729,7 +729,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 933b229d4ef72ffa5f5ceeae56dc79dea3f24bf7..a9d9a1e02b9c1208d1e25c0ecc5afdeeef710ff1 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -753,7 +753,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 4cbf03c11cfab6cede64ff2490645609cf2bb447..a51cf5e033ff408f274aeacd9ff703fcffe4ed56 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -736,7 +736,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 390b07e2da8be130bb978857abf551f8dfe9ce51..51d932c8a515ce41f6fee7d6a062366d195e971b 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -736,7 +736,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 7fe8a6a5f0fb30151fc10926841a04c0b1bcd3a4..c4b535051f7ef235872f5acabafc53eda6e2936c 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -736,7 +736,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index ac2411b67847410c2cfc39027be762ed59cd6a41..b3465378c026fdb39e7620f15d4eb783e90ae5cf 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -733,7 +733,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 52a56937c8ab8e9df87bb219fa02adc98397ed66..5fe1620196e739b28c28500843cf1d96577feefc 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -744,7 +744,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index b3ac5854529a0f504b5bbf360f92a149eff46417..bf990ac1bef38e3b0c9b2da586e4094007df1a6d 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -757,7 +757,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index ad08e0e0229bc1c20efbb0b3a719b66753da2007..9a90ad9e5e600bab5b009c3f037012b2a108c2ce 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -727,7 +727,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index b733bd6af309797ad391216b0486e780ee2b9d06..a1fd9aac0a5db4f6c943e820f8779903b804aff3 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -736,7 +736,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 673e167ff62c93f08e7a172208820280a8281ca5..6db0f4057cf1d9faaa0b826acb4a41fd14a18ea7 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -828,7 +828,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index f321eafebb2d25a7f01c991808344d96597b2f7c..fabcba89c8b815e82ce9997c548b3d10b3198489 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -822,7 +822,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 50e42936d959a1440c55a97e7276b9a33548aa42..c5fda7d47aa01a493ced6d27550a4638fb77d801 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -825,7 +825,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 2726e9a2cf918b4c8233f1011e16f4d3d3f39792..7509fd63432b8d45d1404cb4223ad6f393644e95 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -819,7 +819,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 7a0ff37ba8a2a985b5e70f00f7f5c367ab4ea6ae..9e25b029aa77934e99bd4b732e1404e5541b5ad7 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -820,7 +820,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 79907874f4513dbe5a44f7715a4543ae90ceb7be..d77fe645e5736e873610ba008a9396ccfe27c930 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -739,7 +739,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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 diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 36f6d3c5f55460681c1560c996b1d9fe0e30c175..3c1f39937024ea85e7957d3cb1d1be761ccd022f 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -725,7 +725,7 @@ // // - 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). +// - Move the Z probe (or nozzle) to 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