Add 'blocking move' comments

This commit is contained in:
Scott Lahteine 2021-04-12 20:15:41 -05:00
parent a5d6f6ac98
commit 4044ed8783

View file

@ -367,11 +367,12 @@ void _internal_move_to_destination(const_feedRate_t fr_mm_s/*=0.0f*/
planner.e_factor[active_extruder] = 1.0f; planner.e_factor[active_extruder] = 1.0f;
#endif #endif
#if IS_KINEMATIC #if !IS_KINEMATIC
constexpr bool is_fast = false;
#endif
if (is_fast) if (is_fast)
prepare_fast_move_to_destination(); prepare_fast_move_to_destination();
else else
#endif
prepare_line_to_destination(); prepare_line_to_destination();
feedrate_mm_s = old_feedrate; feedrate_mm_s = old_feedrate;
@ -382,7 +383,12 @@ void _internal_move_to_destination(const_feedRate_t fr_mm_s/*=0.0f*/
} }
/** /**
* Plan a move to (X, Y, Z) and set the current_position * Plan a move to (X, Y, Z) with separation of the XY and Z components.
*
* - If Z is moving up, the Z move is done before XY.
* - If Z is moving down, the Z move is done after XY.
* - Delta may lower Z first to get into the free motion zone.
* - Before returning, wait for the planner buffer to empty.
*/ */
void do_blocking_move_to(const float rx, const float ry, const float rz, const_feedRate_t fr_mm_s/*=0.0*/) { void do_blocking_move_to(const float rx, const float ry, const float rz, const_feedRate_t fr_mm_s/*=0.0*/) {
DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING)); DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING));
@ -391,14 +397,15 @@ void do_blocking_move_to(const float rx, const float ry, const float rz, const_f
const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS), const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS),
xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S); xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S);
#if EITHER(DELTA, IS_SCARA)
if (!position_is_reachable(rx, ry)) return;
destination = current_position; // sync destination at the start
#endif
#if ENABLED(DELTA) #if ENABLED(DELTA)
if (!position_is_reachable(rx, ry)) return;
REMEMBER(fr, feedrate_mm_s, xy_feedrate); REMEMBER(fr, feedrate_mm_s, xy_feedrate);
destination = current_position; // sync destination at the start
if (DEBUGGING(LEVELING)) DEBUG_POS("destination = current_position", destination); if (DEBUGGING(LEVELING)) DEBUG_POS("destination = current_position", destination);
// when in the danger zone // when in the danger zone
@ -432,10 +439,6 @@ void do_blocking_move_to(const float rx, const float ry, const float rz, const_f
#elif IS_SCARA #elif IS_SCARA
if (!position_is_reachable(rx, ry)) return;
destination = current_position;
// If Z needs to raise, do it before moving XY // If Z needs to raise, do it before moving XY
if (destination.z < rz) { if (destination.z < rz) {
destination.z = rz; destination.z = rz;