1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Patch _manual_goto_xy for kinematics

This commit is contained in:
Scott Lahteine 2017-11-08 22:13:19 -06:00
parent 0cfb936dd1
commit 22e18fe832

View File

@ -27,7 +27,7 @@
#include "bedlevel.h"
#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
#include "../../module/stepper.h"
#include "../../module/motion.h"
#endif
#if PLANNER_LEVELING
@ -257,27 +257,20 @@ void reset_bed_level() {
#if ENABLED(MESH_BED_LEVELING) || ENABLED(PROBE_MANUALLY)
void _manual_goto_xy(const float &rx, const float &ry) {
const float old_feedrate_mm_s = feedrate_mm_s;
#if MANUAL_PROBE_HEIGHT > 0
const float prev_z = current_position[Z_AXIS];
feedrate_mm_s = homing_feedrate(Z_AXIS);
current_position[Z_AXIS] = MANUAL_PROBE_HEIGHT;
line_to_current_position();
do_blocking_move_to_z(MANUAL_PROBE_HEIGHT, homing_feedrate(Z_AXIS));
#endif
feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
current_position[X_AXIS] = rx;
current_position[Y_AXIS] = ry;
line_to_current_position();
do_blocking_move_to_xy(rx, ry, MMM_TO_MMS(XY_PROBE_SPEED));
#if MANUAL_PROBE_HEIGHT > 0
feedrate_mm_s = homing_feedrate(Z_AXIS);
current_position[Z_AXIS] = prev_z; // move back to the previous Z.
line_to_current_position();
do_blocking_move_to_z(prev_z, homing_feedrate(Z_AXIS));
#endif
feedrate_mm_s = old_feedrate_mm_s;
stepper.synchronize();
current_position[X_AXIS] = rx;
current_position[Y_AXIS] = ry;
#if ENABLED(PROBE_MANUALLY) && ENABLED(LCD_BED_LEVELING)
lcd_wait_for_move = false;