Skip to content

Commit

Permalink
📝 Add'l homeaxis comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 14, 2025
1 parent 5dc5515 commit 70cdfbe
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*
probe.move_z_after_probing();
#endif
}
#endif
#endif // HAS_Z_AXIS

#if HAS_I_AXIS
void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/*=0.0f*/) {
Expand Down Expand Up @@ -2681,12 +2681,10 @@ void prepare_line_to_destination() {

//
// Homing Z with a probe? Raise Z (maybe) and deploy the Z probe.
// Return early if probe deployment fails.
//
#if HOMING_Z_WITH_PROBE
if (axis == Z_AXIS && probe.deploy()) {
probe.stow();
return;
}
if (axis == Z_AXIS && probe.deploy()) { probe.stow(); return; }
#endif

// Set flags for X, Y, Z motor locking
Expand All @@ -2705,16 +2703,17 @@ void prepare_line_to_destination() {
//
#if HOMING_Z_WITH_PROBE
if (axis == Z_AXIS) {

#if ENABLED(BLTOUCH)
if (bltouch.deploy()) { // BLTouch was deployed above, but get the alarm state.
bltouch.stow();
return;
}
// BLTouch was deployed above, but get the alarm state.
// Stow and return early if there is a deploy alarm.
if (bltouch.deploy()) { bltouch.stow(); return; }
#endif
if (TERN0(PROBE_TARE, probe.tare())) {
probe.stow();
return;
}

// Tare the probe. Stow and return early if it fails
if (TERN0(PROBE_TARE, probe.tare())) { probe.stow(); return; }

// Tell the Bed Distance Sensor we're Z homing
TERN_(BD_SENSOR, bdl.config_state = BDS_HOMING_Z);
}
#endif
Expand Down Expand Up @@ -2987,7 +2986,7 @@ void prepare_line_to_destination() {
if (axis == Z_AXIS) bdl.config_state = BDS_IDLE;
#endif

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

#if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM)
Expand Down

0 comments on commit 70cdfbe

Please sign in to comment.