Browse Source

Fix _manual_goto_xy on kinematic systems

Scott Lahteine 6 years ago
parent
commit
54963cc898
1 changed files with 6 additions and 13 deletions
  1. 6
    13
      Marlin/Marlin_main.cpp

+ 6
- 13
Marlin/Marlin_main.cpp View File

@@ -4263,27 +4263,20 @@ void home_all_axes() { gcode_G28(true); }
4263 4263
   #endif
4264 4264
 
4265 4265
   inline void _manual_goto_xy(const float &rx, const float &ry) {
4266
-    const float old_feedrate_mm_s = feedrate_mm_s;
4266
+
4267 4267
     #if MANUAL_PROBE_HEIGHT > 0
4268 4268
       const float prev_z = current_position[Z_AXIS];
4269
-      feedrate_mm_s = homing_feedrate(Z_AXIS);
4270
-      current_position[Z_AXIS] = MANUAL_PROBE_HEIGHT;
4271
-      line_to_current_position();
4269
+      do_blocking_move_to_z(MANUAL_PROBE_HEIGHT, homing_feedrate(Z_AXIS));
4272 4270
     #endif
4273 4271
 
4274
-    feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
4275
-    current_position[X_AXIS] = rx;
4276
-    current_position[Y_AXIS] = ry;
4277
-    line_to_current_position();
4272
+    do_blocking_move_to_xy(rx, ry, MMM_TO_MMS(XY_PROBE_SPEED));
4278 4273
 
4279 4274
     #if MANUAL_PROBE_HEIGHT > 0
4280
-      feedrate_mm_s = homing_feedrate(Z_AXIS);
4281
-      current_position[Z_AXIS] = prev_z; // move back to the previous Z.
4282
-      line_to_current_position();
4275
+      do_blocking_move_to_z(prev_z, homing_feedrate(Z_AXIS));
4283 4276
     #endif
4284 4277
 
4285
-    feedrate_mm_s = old_feedrate_mm_s;
4286
-    stepper.synchronize();
4278
+    current_position[X_AXIS] = rx;
4279
+    current_position[Y_AXIS] = ry;
4287 4280
 
4288 4281
     #if ENABLED(PROBE_MANUALLY) && ENABLED(LCD_BED_LEVELING)
4289 4282
       lcd_wait_for_move = false;

Loading…
Cancel
Save