Adjustments to blocking moves

master
Scott Lahteine 7 years ago
parent 6b9e7defac
commit 26a40373fc

@ -1697,6 +1697,8 @@ void do_blocking_move_to(const float &rx, const float &ry, const float &rz, cons
if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, LOGICAL_X_POSITION(rx), LOGICAL_Y_POSITION(ry), LOGICAL_Z_POSITION(rz));
#endif
const float z_feedrate = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
#if ENABLED(DELTA)
if (!position_is_reachable(rx, ry)) return;
@ -1721,18 +1723,16 @@ void do_blocking_move_to(const float &rx, const float &ry, const float &rz, cons
#endif
return;
}
else {
destination[Z_AXIS] = delta_clip_start_height;
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
#endif
}
destination[Z_AXIS] = delta_clip_start_height;
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
#endif
}
if (rz > current_position[Z_AXIS]) { // raising?
destination[Z_AXIS] = rz;
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
prepare_uninterpolated_move_to_destination(z_feedrate); // set_current_from_destination
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
#endif
@ -1747,7 +1747,7 @@ void do_blocking_move_to(const float &rx, const float &ry, const float &rz, cons
if (rz < current_position[Z_AXIS]) { // lowering?
destination[Z_AXIS] = rz;
prepare_uninterpolated_move_to_destination(); // set_current_from_destination
prepare_uninterpolated_move_to_destination(z_feedrate); // set_current_from_destination
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
#endif
@ -1762,7 +1762,7 @@ void do_blocking_move_to(const float &rx, const float &ry, const float &rz, cons
// If Z needs to raise, do it before moving XY
if (destination[Z_AXIS] < rz) {
destination[Z_AXIS] = rz;
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS));
prepare_uninterpolated_move_to_destination(z_feedrate);
}
destination[X_AXIS] = rx;
@ -1772,14 +1772,14 @@ void do_blocking_move_to(const float &rx, const float &ry, const float &rz, cons
// If Z needs to lower, do it after moving XY
if (destination[Z_AXIS] > rz) {
destination[Z_AXIS] = rz;
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS));
prepare_uninterpolated_move_to_destination(z_feedrate);
}
#else
// If Z needs to raise, do it before moving XY
if (current_position[Z_AXIS] < rz) {
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
feedrate_mm_s = z_feedrate;
current_position[Z_AXIS] = rz;
buffer_line_to_current_position();
}
@ -1791,7 +1791,7 @@ void do_blocking_move_to(const float &rx, const float &ry, const float &rz, cons
// If Z needs to lower, do it after moving XY
if (current_position[Z_AXIS] > rz) {
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS);
feedrate_mm_s = z_feedrate;
current_position[Z_AXIS] = rz;
buffer_line_to_current_position();
}
@ -4268,13 +4268,10 @@ void home_all_axes() { gcode_G28(true); }
#if MANUAL_PROBE_HEIGHT > 0
const float prev_z = current_position[Z_AXIS];
do_blocking_move_to_z(MANUAL_PROBE_HEIGHT, homing_feedrate(Z_AXIS));
#endif
do_blocking_move_to_xy(rx, ry, MMM_TO_MMS(XY_PROBE_SPEED));
#if MANUAL_PROBE_HEIGHT > 0
do_blocking_move_to_z(prev_z, homing_feedrate(Z_AXIS));
do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
do_blocking_move_to_z(prev_z);
#else
do_blocking_move_to_xy(rx, ry);
#endif
current_position[X_AXIS] = rx;

Loading…
Cancel
Save