Skip to content

Commit 70cdfbe

Browse files
committed
📝 Add'l homeaxis comments
1 parent 5dc5515 commit 70cdfbe

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

Marlin/src/module/motion.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*
13141314
probe.move_z_after_probing();
13151315
#endif
13161316
}
1317-
#endif
1317+
#endif // HAS_Z_AXIS
13181318

13191319
#if HAS_I_AXIS
13201320
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() {
26812681

26822682
//
26832683
// Homing Z with a probe? Raise Z (maybe) and deploy the Z probe.
2684+
// Return early if probe deployment fails.
26842685
//
26852686
#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; }
26902688
#endif
26912689

26922690
// Set flags for X, Y, Z motor locking
@@ -2705,16 +2703,17 @@ void prepare_line_to_destination() {
27052703
//
27062704
#if HOMING_Z_WITH_PROBE
27072705
if (axis == Z_AXIS) {
2706+
27082707
#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; }
27132711
#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
27182717
TERN_(BD_SENSOR, bdl.config_state = BDS_HOMING_Z);
27192718
}
27202719
#endif
@@ -2987,7 +2986,7 @@ void prepare_line_to_destination() {
29872986
if (axis == Z_AXIS) bdl.config_state = BDS_IDLE;
29882987
#endif
29892988

2990-
// Put away the Z probe
2989+
// Put away the Z probe. Return early if it fails.
29912990
if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.stow())) return;
29922991

29932992
#if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM)

0 commit comments

Comments
 (0)