|
|
@ -966,6 +966,48 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
|
|
|
return homing_feedrate(axis) / hbd;
|
|
|
|
return homing_feedrate(axis) / hbd;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(SENSORLESS_HOMING)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Set sensorless homing if the axis has it, accounting for Core Kinematics.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void sensorless_homing_per_axis(const AxisEnum axis, const bool enable/*=true*/) {
|
|
|
|
|
|
|
|
switch (axis) {
|
|
|
|
|
|
|
|
#if X_SENSORLESS
|
|
|
|
|
|
|
|
case X_AXIS:
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperX, enable);
|
|
|
|
|
|
|
|
#if CORE_IS_XY && Y_SENSORLESS
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperY, enable);
|
|
|
|
|
|
|
|
#elif CORE_IS_XZ && Z_SENSORLESS
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperZ, enable);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if Y_SENSORLESS
|
|
|
|
|
|
|
|
case Y_AXIS:
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperY, enable);
|
|
|
|
|
|
|
|
#if CORE_IS_XY && X_SENSORLESS
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperX, enable);
|
|
|
|
|
|
|
|
#elif CORE_IS_YZ && Z_SENSORLESS
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperZ, enable);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if Z_SENSORLESS
|
|
|
|
|
|
|
|
case Z_AXIS:
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperZ, enable);
|
|
|
|
|
|
|
|
#if CORE_IS_XZ && X_SENSORLESS
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperX, enable);
|
|
|
|
|
|
|
|
#elif CORE_IS_YZ && Y_SENSORLESS
|
|
|
|
|
|
|
|
tmc_sensorless_homing(stepperY, enable);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SENSORLESS_HOMING
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Home an individual linear axis
|
|
|
|
* Home an individual linear axis
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -992,15 +1034,7 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
|
|
|
|
|
|
|
|
|
|
|
// Disable stealthChop if used. Enable diag1 pin on driver.
|
|
|
|
// Disable stealthChop if used. Enable diag1 pin on driver.
|
|
|
|
#if ENABLED(SENSORLESS_HOMING)
|
|
|
|
#if ENABLED(SENSORLESS_HOMING)
|
|
|
|
#if ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY)
|
|
|
|
sensorless_homing_per_axis(axis);
|
|
|
|
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
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Tell the planner the axis is at 0
|
|
|
|
// Tell the planner the axis is at 0
|
|
|
@ -1031,15 +1065,7 @@ static void do_homing_move(const AxisEnum axis, const float distance, const floa
|
|
|
|
|
|
|
|
|
|
|
|
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
|
|
|
// Re-enable stealthChop if used. Disable diag1 pin on driver.
|
|
|
|
#if ENABLED(SENSORLESS_HOMING)
|
|
|
|
#if ENABLED(SENSORLESS_HOMING)
|
|
|
|
#if ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY)
|
|
|
|
sensorless_homing_per_axis(axis, false);
|
|
|
|
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
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|