Browse Source

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

pull/1/head
Chris Roadfeldt 10 years ago
parent
commit
08a7aa16c5
  1. 6
      Marlin/Marlin_main.cpp

6
Marlin/Marlin_main.cpp

@ -1493,7 +1493,8 @@ 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
#ifndef Z_PROBE_AND_ENDSTOP
#ifdef SERVO_ENDSTOPS #ifdef SERVO_ENDSTOPS
#if SERVO_LEVELING #if SERVO_LEVELING
if (axis==Z_AXIS) { if (axis==Z_AXIS) {
@ -1505,6 +1506,7 @@ static void homeaxis(int axis) {
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,11 +1924,13 @@ 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);
} }

Loading…
Cancel
Save