Merge pull request #4476 from otvald/RCBugFix

FIX for endstop adjustemt on delta is offset
master
Scott Lahteine 9 years ago committed by GitHub
commit f388beafa1

@ -2414,6 +2414,10 @@ static void homeaxis(AxisEnum axis) {
// Move slowly towards the endstop until triggered
line_to_axis_pos(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
// reset current_position to 0 to reflect hitting endpoint
current_position[axis] = 0;
sync_plan_position();
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("> TRIGGER ENDSTOP", current_position);
#endif
@ -2430,7 +2434,6 @@ static void homeaxis(AxisEnum axis) {
lockZ1 = (z_endstop_adj < 0);
if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
sync_plan_position();
// Move to the adjusted endstop height
line_to_axis_pos(axis, adj);
@ -2443,7 +2446,6 @@ static void homeaxis(AxisEnum axis) {
#if ENABLED(DELTA)
// retrace by the amount specified in endstop_adj
if (endstop_adj[axis] * axis_home_dir < 0) {
sync_plan_position();
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);

Loading…
Cancel
Save