Skip to content

Commit bfa3dfd

Browse files
committed
fix toolchange_prime()
1 parent 11f98ad commit bfa3dfd

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Marlin/src/module/tool_change.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,15 +1068,23 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
10681068
#if ENABLED(TOOLCHANGE_PARK)
10691069
if (ok) {
10701070
#if ENABLED(TOOLCHANGE_NO_RETURN)
1071-
const float temp = destination.z;
1072-
destination = current_position;
1073-
destination.z = temp;
1071+
destination.x = current_position.x;
1072+
destination.y = current_position.y;
10741073
#endif
1075-
prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)));
1074+
do_blocking_move_to_xy(destination, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE));
10761075
}
10771076
#endif
1077+
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
1078+
planner.synchronize();
10781079

1080+
//Previous position applied
1081+
current_position.e = destination.e;
1082+
sync_plan_position_e();
10791083
extruder_cutting_recover(destination.e); // Cutting recover
1084+
1085+
#if HAS_FAN && TOOLCHANGE_FS_FAN >= 0
1086+
RESTORE(fan);
1087+
#endif
10801088
}
10811089

10821090
FS_DEBUG("<<< tool_change_prime");

0 commit comments

Comments
 (0)