do_blocking_move_*() no longer depend on HAS_BED_PROBE

This commit is contained in:
João Brázio 2016-07-15 00:26:37 +01:00
parent 8bf6861af8
commit e71a631f8f

View File

@ -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
*/ */