|
|
|
@ -57,25 +57,6 @@ float zprobe_zoffset; // Initialized by settings.load()
|
|
|
|
|
const int z_servo_angle[2] = Z_SERVO_ANGLES;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Raise Z to a minimum height to make room for a probe to move
|
|
|
|
|
*/
|
|
|
|
|
inline void do_probe_raise(const float z_raise) {
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
if (DEBUGGING(LEVELING)) {
|
|
|
|
|
SERIAL_ECHOPAIR("do_probe_raise(", z_raise);
|
|
|
|
|
SERIAL_CHAR(')');
|
|
|
|
|
SERIAL_EOL();
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
float z_dest = z_raise;
|
|
|
|
|
if (zprobe_zoffset < 0) z_dest -= zprobe_zoffset;
|
|
|
|
|
|
|
|
|
|
if (z_dest > current_position[Z_AXIS])
|
|
|
|
|
do_blocking_move_to_z(z_dest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if ENABLED(Z_PROBE_SLED)
|
|
|
|
|
|
|
|
|
|
#ifndef SLED_DOCKING_OFFSET
|
|
|
|
@ -353,6 +334,27 @@ inline void do_probe_raise(const float z_raise) {
|
|
|
|
|
|
|
|
|
|
#endif // BLTOUCH
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Raise Z to a minimum height to make room for a probe to move
|
|
|
|
|
*/
|
|
|
|
|
inline void do_probe_raise(const float z_raise) {
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
|
if (DEBUGGING(LEVELING)) {
|
|
|
|
|
SERIAL_ECHOPAIR("do_probe_raise(", z_raise);
|
|
|
|
|
SERIAL_CHAR(')');
|
|
|
|
|
SERIAL_EOL();
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
float z_dest = z_raise;
|
|
|
|
|
if (zprobe_zoffset < 0) z_dest -= zprobe_zoffset;
|
|
|
|
|
|
|
|
|
|
NOMORE(z_dest, Z_MAX_POS);
|
|
|
|
|
|
|
|
|
|
if (z_dest > current_position[Z_AXIS])
|
|
|
|
|
do_blocking_move_to_z(z_dest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// returns false for ok and true for failure
|
|
|
|
|
bool set_probe_deployed(const bool deploy) {
|
|
|
|
|
|
|
|
|
@ -376,13 +378,21 @@ bool set_probe_deployed(const bool deploy) {
|
|
|
|
|
|
|
|
|
|
// Make room for probe to deploy (or stow)
|
|
|
|
|
// Fix-mounted probe should only raise for deploy
|
|
|
|
|
if (
|
|
|
|
|
#if ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
|
deploy
|
|
|
|
|
#else
|
|
|
|
|
true
|
|
|
|
|
#endif
|
|
|
|
|
) do_probe_raise(max(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE));
|
|
|
|
|
#if ENABLED(FIX_MOUNTED_PROBE)
|
|
|
|
|
const bool deploy_stow_condition = deploy;
|
|
|
|
|
#else
|
|
|
|
|
constexpr bool deploy_stow_condition = true;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// For beds that fall when Z is powered off only raise for trusted Z
|
|
|
|
|
#if ENABLED(UNKNOWN_Z_NO_RAISE)
|
|
|
|
|
const bool unknown_condition = axis_known_position[Z_AXIS];
|
|
|
|
|
#else
|
|
|
|
|
constexpr float unknown_condition = true;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (deploy_stow_condition && unknown_condition)
|
|
|
|
|
do_probe_raise(max(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE));
|
|
|
|
|
|
|
|
|
|
#if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY)
|
|
|
|
|
#if ENABLED(Z_PROBE_SLED)
|
|
|
|
|