Procházet zdrojové kódy

Move Z up before, or down after XY, for "blocking move"

Scott Lahteine před 9 roky
rodič
revize
6803c8e37e
1 změnil soubory, kde provedl 13 přidání a 6 odebrání
  1. 13
    6
      Marlin/Marlin_main.cpp

+ 13
- 6
Marlin/Marlin_main.cpp Zobrazit soubor

@@ -1666,18 +1666,25 @@ static void clean_up_after_endstop_or_probe_move() {
1666 1666
 
1667 1667
     #else
1668 1668
 
1669
-      feedrate = homing_feedrate[Z_AXIS];
1670
-
1671
-      current_position[Z_AXIS] = z;
1672
-      line_to_current_position();
1673
-      stepper.synchronize();
1669
+      // If Z needs to raise, do it before moving XY
1670
+      if (current_position[Z_AXIS] < z) {
1671
+        feedrate = homing_feedrate[Z_AXIS];
1672
+        current_position[Z_AXIS] = z;
1673
+        line_to_current_position();
1674
+      }
1674 1675
 
1675 1676
       feedrate = XY_PROBE_FEEDRATE;
1676
-
1677 1677
       current_position[X_AXIS] = x;
1678 1678
       current_position[Y_AXIS] = y;
1679 1679
       line_to_current_position();
1680 1680
 
1681
+      // If Z needs to lower, do it after moving XY
1682
+      if (current_position[Z_AXIS] > z) {
1683
+        feedrate = homing_feedrate[Z_AXIS];
1684
+        current_position[Z_AXIS] = z;
1685
+        line_to_current_position();
1686
+      }
1687
+
1681 1688
     #endif
1682 1689
 
1683 1690
     stepper.synchronize();

Loading…
Zrušit
Uložit