Moves do_blocking_move_to_xy() out of the HAS_BED_PROBE define
This commit is contained in:
parent
cec7110409
commit
fdea8b6e6a
|
@ -1606,34 +1606,6 @@ inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[
|
||||||
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
|
inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
|
||||||
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
|
inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
|
||||||
|
|
||||||
//
|
|
||||||
// Prepare to do endstop or probe moves
|
|
||||||
// with custom feedrates.
|
|
||||||
//
|
|
||||||
// - Save current feedrates
|
|
||||||
// - Reset the rate multiplier
|
|
||||||
// - Reset the command timeout
|
|
||||||
// - Enable the endstops (for endstop moves)
|
|
||||||
//
|
|
||||||
static void setup_for_endstop_or_probe_move() {
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("setup_for_endstop_or_probe_move", current_position);
|
|
||||||
#endif
|
|
||||||
saved_feedrate = feedrate;
|
|
||||||
saved_feedrate_multiplier = feedrate_multiplier;
|
|
||||||
feedrate_multiplier = 100;
|
|
||||||
refresh_cmd_timeout();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void clean_up_after_endstop_or_probe_move() {
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_POS("clean_up_after_endstop_or_probe_move", current_position);
|
|
||||||
#endif
|
|
||||||
feedrate = saved_feedrate;
|
|
||||||
feedrate_multiplier = saved_feedrate_multiplier;
|
|
||||||
refresh_cmd_timeout();
|
|
||||||
}
|
|
||||||
|
|
||||||
#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
|
||||||
|
@ -1713,6 +1685,38 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void do_blocking_move_to_xy(float x, float y, float feed_rate = 0.0) {
|
||||||
|
do_blocking_move_to(x, y, current_position[Z_AXIS], feed_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Prepare to do endstop or probe moves
|
||||||
|
// with custom feedrates.
|
||||||
|
//
|
||||||
|
// - Save current feedrates
|
||||||
|
// - Reset the rate multiplier
|
||||||
|
// - Reset the command timeout
|
||||||
|
// - Enable the endstops (for endstop moves)
|
||||||
|
//
|
||||||
|
static void setup_for_endstop_or_probe_move() {
|
||||||
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
if (DEBUGGING(LEVELING)) DEBUG_POS("setup_for_endstop_or_probe_move", current_position);
|
||||||
|
#endif
|
||||||
|
saved_feedrate = feedrate;
|
||||||
|
saved_feedrate_multiplier = feedrate_multiplier;
|
||||||
|
feedrate_multiplier = 100;
|
||||||
|
refresh_cmd_timeout();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void clean_up_after_endstop_or_probe_move() {
|
||||||
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
if (DEBUGGING(LEVELING)) DEBUG_POS("clean_up_after_endstop_or_probe_move", current_position);
|
||||||
|
#endif
|
||||||
|
feedrate = saved_feedrate;
|
||||||
|
feedrate_multiplier = saved_feedrate_multiplier;
|
||||||
|
refresh_cmd_timeout();
|
||||||
|
}
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#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
|
||||||
|
@ -1735,8 +1739,7 @@ inline void do_blocking_move_to_z(float z, float feed_rate = 0.0) {
|
||||||
|
|
||||||
#endif //HAS_BED_PROBE
|
#endif //HAS_BED_PROBE
|
||||||
|
|
||||||
#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(Z_SAFE_HOMING) || HAS_PROBING_PROCEDURE || HOTENDS > 1
|
static bool axis_unhomed_error(const bool x, const bool y, const bool z) {
|
||||||
static bool axis_unhomed_error(const bool x, const bool y, const bool z) {
|
|
||||||
const bool xx = x && !axis_homed[X_AXIS],
|
const bool xx = x && !axis_homed[X_AXIS],
|
||||||
yy = y && !axis_homed[Y_AXIS],
|
yy = y && !axis_homed[Y_AXIS],
|
||||||
zz = z && !axis_homed[Z_AXIS];
|
zz = z && !axis_homed[Z_AXIS];
|
||||||
|
@ -1760,8 +1763,7 @@ inline void do_blocking_move_to_z(float z, float feed_rate = 0.0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(Z_PROBE_SLED)
|
#if ENABLED(Z_PROBE_SLED)
|
||||||
|
|
||||||
|
@ -2110,10 +2112,6 @@ inline void do_blocking_move_to_z(float z, float feed_rate = 0.0) {
|
||||||
return current_position[Z_AXIS];
|
return current_position[Z_AXIS];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void do_blocking_move_to_xy(float x, float y, float feed_rate = 0.0) {
|
|
||||||
do_blocking_move_to(x, y, current_position[Z_AXIS], feed_rate);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// - Move to the given XY
|
// - Move to the given XY
|
||||||
// - Deploy the probe, if not already deployed
|
// - Deploy the probe, if not already deployed
|
||||||
|
|
Loading…
Reference in a new issue