Browse Source

Merge pull request #1987 from thinkyhead/fix_homing_zpos

Disable endstops between homing bumps
pull/1/head
Scott Lahteine 10 years ago
parent
commit
c1dd9bda7f
  1. 6
      Marlin/Marlin_main.cpp

6
Marlin/Marlin_main.cpp

@ -1546,11 +1546,15 @@ static void homeaxis(AxisEnum axis) {
current_position[axis] = 0; current_position[axis] = 0;
sync_plan_position(); sync_plan_position();
enable_endstops(false); // Disable endstops while moving away
// Move away from the endstop by the axis HOME_BUMP_MM // Move away from the endstop by the axis HOME_BUMP_MM
destination[axis] = -home_bump_mm(axis) * axis_home_dir; destination[axis] = -home_bump_mm(axis) * axis_home_dir;
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
enable_endstops(true); // Enable endstops for next homing move
// Slow down the feedrate for the next move // Slow down the feedrate for the next move
set_homing_bump_feedrate(axis); set_homing_bump_feedrate(axis);
@ -1587,10 +1591,12 @@ static void homeaxis(AxisEnum axis) {
#ifdef DELTA #ifdef DELTA
// retrace by the amount specified in endstop_adj // retrace by the amount specified in endstop_adj
if (endstop_adj[axis] * axis_home_dir < 0) { if (endstop_adj[axis] * axis_home_dir < 0) {
enable_endstops(false); // Disable endstops while moving away
sync_plan_position(); sync_plan_position();
destination[axis] = endstop_adj[axis]; destination[axis] = endstop_adj[axis];
line_to_destination(); line_to_destination();
st_synchronize(); st_synchronize();
enable_endstops(true); // Enable endstops for next homing move
} }
#endif #endif

Loading…
Cancel
Save