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