Enable Z axis and delta sensorless homing (#9516)
This commit is contained in:
committed by
Scott Lahteine
parent
b2f8b4ada5
commit
1541224a81
@ -990,6 +990,19 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
||||
if (axis == Z_AXIS) probing_pause(true);
|
||||
#endif
|
||||
|
||||
// Disable stealthChop if used. Enable diag1 pin on driver.
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
#if ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY)
|
||||
if (axis == X_AXIS) tmc_sensorless_homing(stepperX);
|
||||
#endif
|
||||
#if ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY)
|
||||
if (axis == Y_AXIS) tmc_sensorless_homing(stepperY);
|
||||
#endif
|
||||
#if ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY)
|
||||
if (axis == Z_AXIS) tmc_sensorless_homing(stepperZ);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Tell the planner the axis is at 0
|
||||
current_position[axis] = 0;
|
||||
|
||||
@ -1016,6 +1029,19 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
||||
|
||||
endstops.hit_on_purpose();
|
||||
|
||||
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
#if ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY)
|
||||
if (axis == X_AXIS) tmc_sensorless_homing(stepperX, false);
|
||||
#endif
|
||||
#if ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY)
|
||||
if (axis == Y_AXIS) tmc_sensorless_homing(stepperY, false);
|
||||
#endif
|
||||
#if ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY)
|
||||
if (axis == Z_AXIS) tmc_sensorless_homing(stepperZ, false);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) {
|
||||
SERIAL_ECHOPAIR("<<< do_homing_move(", axis_codes[axis]);
|
||||
@ -1168,16 +1194,6 @@ void homeaxis(const AxisEnum axis) {
|
||||
if (axis == Z_AXIS) stepper.set_homing_flag_z(true);
|
||||
#endif
|
||||
|
||||
// Disable stealthChop if used. Enable diag1 pin on driver.
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
#if ENABLED(X_IS_TMC2130)
|
||||
if (axis == X_AXIS) tmc_sensorless_homing(stepperX);
|
||||
#endif
|
||||
#if ENABLED(Y_IS_TMC2130)
|
||||
if (axis == Y_AXIS) tmc_sensorless_homing(stepperY);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Fast move towards endstop until triggered
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Home 1 Fast:");
|
||||
@ -1278,16 +1294,6 @@ void homeaxis(const AxisEnum axis) {
|
||||
|
||||
#endif
|
||||
|
||||
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
#if ENABLED(X_IS_TMC2130)
|
||||
if (axis == X_AXIS) tmc_sensorless_homing(stepperX, false);
|
||||
#endif
|
||||
#if ENABLED(Y_IS_TMC2130)
|
||||
if (axis == Y_AXIS) tmc_sensorless_homing(stepperY, false);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Put away the Z probe
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
if (axis == Z_AXIS && STOW_PROBE()) return;
|
||||
|
Reference in New Issue
Block a user