|
|
@ -1528,14 +1528,19 @@ static void homeaxis(AxisEnum axis) {
|
|
|
|
#if SERVO_LEVELING && !defined(Z_PROBE_SLED)
|
|
|
|
#if SERVO_LEVELING && !defined(Z_PROBE_SLED)
|
|
|
|
|
|
|
|
|
|
|
|
// Deploy a probe if there is one, and homing towards the bed
|
|
|
|
// Deploy a probe if there is one, and homing towards the bed
|
|
|
|
if (axis == Z_AXIS && axis_home_dir < 0) deploy_z_probe();
|
|
|
|
if (axis == Z_AXIS) {
|
|
|
|
|
|
|
|
if (axis_home_dir < 0) deploy_z_probe();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
#elif defined(SERVO_ENDSTOPS)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SERVO_ENDSTOPS
|
|
|
|
|
|
|
|
{
|
|
|
|
// Engage Servo endstop if enabled
|
|
|
|
// Engage Servo endstop if enabled
|
|
|
|
if (servo_endstops[axis] > -1)
|
|
|
|
if (servo_endstops[axis] > -1)
|
|
|
|
servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
|
|
|
|
servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Set a flag for Z motor locking
|
|
|
|
// Set a flag for Z motor locking
|
|
|
@ -1618,15 +1623,20 @@ static void homeaxis(AxisEnum axis) {
|
|
|
|
|
|
|
|
|
|
|
|
#if SERVO_LEVELING && !defined(Z_PROBE_SLED)
|
|
|
|
#if SERVO_LEVELING && !defined(Z_PROBE_SLED)
|
|
|
|
|
|
|
|
|
|
|
|
// Stow the Z probe if it had been deployed
|
|
|
|
// Deploy a probe if there is one, and homing towards the bed
|
|
|
|
if (axis == Z_AXIS && axis_home_dir < 0) stow_z_probe();
|
|
|
|
if (axis == Z_AXIS) {
|
|
|
|
|
|
|
|
if (axis_home_dir < 0) stow_z_probe();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
#elif defined(SERVO_ENDSTOPS)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SERVO_ENDSTOPS
|
|
|
|
|
|
|
|
{
|
|
|
|
// Retract Servo endstop if enabled
|
|
|
|
// Retract Servo endstop if enabled
|
|
|
|
if (servo_endstops[axis] > -1)
|
|
|
|
if (servo_endstops[axis] > -1)
|
|
|
|
servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
|
|
|
|
servo[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|