Merge pull request #4307 from jbrazio/feature/movement-unleash

Remove do_blocking_move_*() dependency on HAS_BED_PROBE
master
Scott Lahteine 8 years ago committed by GitHub
commit 84bf58db72

@ -1624,8 +1624,7 @@ static void clean_up_after_endstop_or_probe_move() {
refresh_cmd_timeout(); refresh_cmd_timeout();
} }
#if HAS_BED_PROBE #if ENABLED(DELTA)
#if ENABLED(DELTA)
/** /**
* Calculate delta, start a line, and set current_position to destination * Calculate delta, start a line, and set current_position to destination
*/ */
@ -1638,13 +1637,13 @@ static void clean_up_after_endstop_or_probe_move() {
planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], (feedrate / 60) * (feedrate_multiplier / 100.0), active_extruder); planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], (feedrate / 60) * (feedrate_multiplier / 100.0), active_extruder);
set_current_to_destination(); set_current_to_destination();
} }
#endif #endif
/** /**
* Plan a move to (X, Y, Z) and set the current_position * Plan a move to (X, Y, Z) and set the current_position
* The final current_position may not be the one that was requested * The final current_position may not be the one that was requested
*/ */
static void do_blocking_move_to(float x, float y, float z, float feed_rate = 0.0) { static void do_blocking_move_to(float x, float y, float z, float feed_rate = 0.0) {
float old_feedrate = feedrate; float old_feedrate = feedrate;
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
@ -1690,20 +1689,21 @@ static void clean_up_after_endstop_or_probe_move() {
stepper.synchronize(); stepper.synchronize();
feedrate = old_feedrate; feedrate = old_feedrate;
} }
inline void do_blocking_move_to_x(float x, float feed_rate = 0.0) { inline void do_blocking_move_to_x(float x, float feed_rate = 0.0) {
do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], feed_rate); do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], feed_rate);
} }
inline void do_blocking_move_to_y(float y) { inline void do_blocking_move_to_y(float y) {
do_blocking_move_to(current_position[X_AXIS], y, current_position[Z_AXIS]); do_blocking_move_to(current_position[X_AXIS], y, current_position[Z_AXIS]);
} }
inline void do_blocking_move_to_z(float z, float feed_rate = 0.0) { inline void do_blocking_move_to_z(float z, float feed_rate = 0.0) {
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, feed_rate); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, feed_rate);
} }
#if HAS_BED_PROBE
/** /**
* Raise Z to a minimum height to make room for a probe to move * Raise Z to a minimum height to make room for a probe to move
*/ */

Loading…
Cancel
Save