Quellcode durchsuchen

Patch _manual_goto_xy for kinematics

Scott Lahteine vor 7 Jahren
Ursprung
Commit
22e18fe832
1 geänderte Dateien mit 7 neuen und 14 gelöschten Zeilen
  1. 7
    14
      Marlin/src/feature/bedlevel/bedlevel.cpp

+ 7
- 14
Marlin/src/feature/bedlevel/bedlevel.cpp Datei anzeigen

@@ -27,7 +27,7 @@
27 27
 #include "bedlevel.h"
28 28
 
29 29
 #if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
30
-  #include "../../module/stepper.h"
30
+  #include "../../module/motion.h"
31 31
 #endif
32 32
 
33 33
 #if PLANNER_LEVELING
@@ -257,27 +257,20 @@ void reset_bed_level() {
257 257
 #if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
258 258
 
259 259
   void _manual_goto_xy(const float &rx, const float &ry) {
260
-    const float old_feedrate_mm_s = feedrate_mm_s;
260
+
261 261
     #if MANUAL_PROBE_HEIGHT > 0
262 262
       const float prev_z = current_position[Z_AXIS];
263
-      feedrate_mm_s = homing_feedrate(Z_AXIS);
264
-      current_position[Z_AXIS] = MANUAL_PROBE_HEIGHT;
265
-      line_to_current_position();
263
+      do_blocking_move_to_z(MANUAL_PROBE_HEIGHT, homing_feedrate(Z_AXIS));
266 264
     #endif
267 265
 
268
-    feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
269
-    current_position[X_AXIS] = rx;
270
-    current_position[Y_AXIS] = ry;
271
-    line_to_current_position();
266
+    do_blocking_move_to_xy(rx, ry, MMM_TO_MMS(XY_PROBE_SPEED));
272 267
 
273 268
     #if MANUAL_PROBE_HEIGHT > 0
274
-      feedrate_mm_s = homing_feedrate(Z_AXIS);
275
-      current_position[Z_AXIS] = prev_z; // move back to the previous Z.
276
-      line_to_current_position();
269
+      do_blocking_move_to_z(prev_z, homing_feedrate(Z_AXIS));
277 270
     #endif
278 271
 
279
-    feedrate_mm_s = old_feedrate_mm_s;
280
-    stepper.synchronize();
272
+    current_position[X_AXIS] = rx;
273
+    current_position[Y_AXIS] = ry;
281 274
 
282 275
     #if ENABLED(PROBE_MANUALLY) && ENABLED(LCD_BED_LEVELING)
283 276
       lcd_wait_for_move = false;

Laden…
Abbrechen
Speichern