Don't deploy Z Probe on Z homing if Z_PROBE_AND_ENDSTOP is defined.

This commit is contained in:
Chris Roadfeldt 2015-03-29 03:21:48 -05:00
parent 80285251cc
commit 08a7aa16c5

View file

@ -1493,7 +1493,8 @@ static void homeaxis(int axis) {
#ifndef Z_PROBE_SLED
// Engage Servo endstop if enabled
// Engage Servo endstop if enabled and we are not using Z_PROBE_AND_ENDSTOP
#ifndef Z_PROBE_AND_ENDSTOP
#ifdef SERVO_ENDSTOPS
#if SERVO_LEVELING
if (axis==Z_AXIS) {
@ -1505,6 +1506,7 @@ static void homeaxis(int axis) {
servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
}
#endif
#endif // Z_PROBE_AND_ENDSTOP
#endif // Z_PROBE_SLED
#ifdef Z_DUAL_ENDSTOPS
if (axis==Z_AXIS) In_Homing_Process(true);
@ -1922,11 +1924,13 @@ inline void gcode_G28() {
if (home_all_axis || code_seen(axis_codes[Z_AXIS])) {
#if defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
#ifndef Z_PROBE_AND_ENDSTOP
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
feedrate = max_feedrate[Z_AXIS];
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
st_synchronize();
#endif
#endif
HOMEAXIS(Z);
}