|
@@ -2414,6 +2414,10 @@ static void homeaxis(AxisEnum axis) {
|
2414
|
2414
|
// Move slowly towards the endstop until triggered
|
2415
|
2415
|
line_to_axis_pos(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
|
2416
|
2416
|
|
|
2417
|
+ // reset current_position to 0 to reflect hitting endpoint
|
|
2418
|
+ current_position[axis] = 0;
|
|
2419
|
+ sync_plan_position();
|
|
2420
|
+
|
2417
|
2421
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2418
|
2422
|
if (DEBUGGING(LEVELING)) DEBUG_POS("> TRIGGER ENDSTOP", current_position);
|
2419
|
2423
|
#endif
|
|
@@ -2430,7 +2434,6 @@ static void homeaxis(AxisEnum axis) {
|
2430
|
2434
|
lockZ1 = (z_endstop_adj < 0);
|
2431
|
2435
|
|
2432
|
2436
|
if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
|
2433
|
|
- sync_plan_position();
|
2434
|
2437
|
|
2435
|
2438
|
// Move to the adjusted endstop height
|
2436
|
2439
|
line_to_axis_pos(axis, adj);
|
|
@@ -2443,7 +2446,6 @@ static void homeaxis(AxisEnum axis) {
|
2443
|
2446
|
#if ENABLED(DELTA)
|
2444
|
2447
|
// retrace by the amount specified in endstop_adj
|
2445
|
2448
|
if (endstop_adj[axis] * axis_home_dir < 0) {
|
2446
|
|
- sync_plan_position();
|
2447
|
2449
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2448
|
2450
|
if (DEBUGGING(LEVELING)) {
|
2449
|
2451
|
SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
|