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. 14
      Marlin/Marlin_main.cpp

14
Marlin/Marlin_main.cpp

@ -1493,18 +1493,20 @@ static void homeaxis(int axis) {
#ifndef Z_PROBE_SLED
// Engage Servo endstop if enabled
#ifdef SERVO_ENDSTOPS
#if SERVO_LEVELING
// 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) {
engage_z_probe();
}
else
#endif
#endif
if (servo_endstops[axis] > -1) {
servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
}
#endif
#endif
#endif // Z_PROBE_AND_ENDSTOP
#endif // Z_PROBE_SLED
#ifdef Z_DUAL_ENDSTOPS
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 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);
}

Loading…
Cancel
Save