@@ -1314,7 +1314,7 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*
1314
1314
probe.move_z_after_probing ();
1315
1315
#endif
1316
1316
}
1317
- #endif
1317
+ #endif // HAS_Z_AXIS
1318
1318
1319
1319
#if HAS_I_AXIS
1320
1320
void do_blocking_move_to_xyz_i (const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/* =0.0f*/ ) {
@@ -2681,12 +2681,10 @@ void prepare_line_to_destination() {
2681
2681
2682
2682
//
2683
2683
// Homing Z with a probe? Raise Z (maybe) and deploy the Z probe.
2684
+ // Return early if probe deployment fails.
2684
2685
//
2685
2686
#if HOMING_Z_WITH_PROBE
2686
- if (axis == Z_AXIS && probe.deploy ()) {
2687
- probe.stow ();
2688
- return ;
2689
- }
2687
+ if (axis == Z_AXIS && probe.deploy ()) { probe.stow (); return ; }
2690
2688
#endif
2691
2689
2692
2690
// Set flags for X, Y, Z motor locking
@@ -2705,16 +2703,17 @@ void prepare_line_to_destination() {
2705
2703
//
2706
2704
#if HOMING_Z_WITH_PROBE
2707
2705
if (axis == Z_AXIS) {
2706
+
2708
2707
#if ENABLED(BLTOUCH)
2709
- if (bltouch.deploy ()) { // BLTouch was deployed above, but get the alarm state.
2710
- bltouch.stow ();
2711
- return ;
2712
- }
2708
+ // BLTouch was deployed above, but get the alarm state.
2709
+ // Stow and return early if there is a deploy alarm.
2710
+ if (bltouch.deploy ()) { bltouch.stow (); return ; }
2713
2711
#endif
2714
- if (TERN0 (PROBE_TARE, probe.tare ())) {
2715
- probe.stow ();
2716
- return ;
2717
- }
2712
+
2713
+ // Tare the probe. Stow and return early if it fails
2714
+ if (TERN0 (PROBE_TARE, probe.tare ())) { probe.stow (); return ; }
2715
+
2716
+ // Tell the Bed Distance Sensor we're Z homing
2718
2717
TERN_ (BD_SENSOR, bdl.config_state = BDS_HOMING_Z);
2719
2718
}
2720
2719
#endif
@@ -2987,7 +2986,7 @@ void prepare_line_to_destination() {
2987
2986
if (axis == Z_AXIS) bdl.config_state = BDS_IDLE;
2988
2987
#endif
2989
2988
2990
- // Put away the Z probe
2989
+ // Put away the Z probe. Return early if it fails.
2991
2990
if (TERN0 (HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.stow ())) return ;
2992
2991
2993
2992
#if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM)
0 commit comments