Do moves towards endstops differently in do_homing_move
This commit is contained in:
parent
d573a2cada
commit
dbe2b6f7b0
@ -998,8 +998,17 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
||||
}
|
||||
#endif
|
||||
|
||||
// Only do some things when moving towards an endstop
|
||||
const int8_t axis_home_dir =
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
(axis == X_AXIS) ? x_home_dir(active_extruder) :
|
||||
#endif
|
||||
home_dir(axis);
|
||||
const bool is_home_dir = (axis_home_dir > 0) == (distance > 0);
|
||||
|
||||
if (is_home_dir) {
|
||||
#if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
|
||||
const bool deploy_bltouch = (axis == Z_AXIS && distance < 0);
|
||||
const bool deploy_bltouch = (axis == Z_AXIS && is_home_dir);
|
||||
if (deploy_bltouch) set_bltouch_deployed(true);
|
||||
#endif
|
||||
|
||||
@ -1011,6 +1020,7 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
sensorless_homing_per_axis(axis);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Tell the planner the axis is at 0
|
||||
current_position[axis] = 0;
|
||||
@ -1028,6 +1038,7 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
||||
|
||||
stepper.synchronize();
|
||||
|
||||
if (is_home_dir) {
|
||||
#if QUIET_PROBING
|
||||
if (axis == Z_AXIS) probing_pause(false);
|
||||
#endif
|
||||
@ -1042,6 +1053,7 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
sensorless_homing_per_axis(axis, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
|
Loading…
Reference in New Issue
Block a user