|
@@ -494,21 +494,25 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
494
|
494
|
|
495
|
495
|
// Move to the "old position" (move the extruder into place)
|
496
|
496
|
if (!no_move && IsRunning()) {
|
|
497
|
+ #if ENABLED(SWITCHING_NOZZLE)
|
|
498
|
+ if (z_raise != z_diff)
|
|
499
|
+ destination[Z_AXIS] += z_diff; // Include the Z restore with the "move back"
|
|
500
|
+ #endif
|
497
|
501
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
498
|
502
|
if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
|
499
|
503
|
#endif
|
500
|
|
- prepare_move_to_destination();
|
|
504
|
+ // Move back to the original (or tweaked) position
|
|
505
|
+ do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
|
501
|
506
|
}
|
502
|
|
-
|
503
|
507
|
#if ENABLED(SWITCHING_NOZZLE)
|
504
|
508
|
// Move back down, if needed. (Including when the new tool is higher.)
|
505
|
|
- if (z_raise != z_diff) {
|
|
509
|
+ else if (z_raise != z_diff) {
|
|
510
|
+ set_destination_from_current(); // Prevent any XY move
|
506
|
511
|
destination[Z_AXIS] += z_diff;
|
507
|
512
|
feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS];
|
508
|
513
|
prepare_move_to_destination();
|
509
|
514
|
}
|
510
|
515
|
#endif
|
511
|
|
-
|
512
|
516
|
} // (tmp_extruder != active_extruder)
|
513
|
517
|
|
514
|
518
|
stepper.synchronize();
|