Fix homing with probe feedrates
This commit is contained in:
parent
59fda986ea
commit
4dfc011d86
2 changed files with 11 additions and 7 deletions
|
@ -985,11 +985,11 @@ void prepare_move_to_destination() {
|
|||
#endif // HAS_AXIS_UNHOMED_ERR
|
||||
|
||||
/**
|
||||
* The homing feedrate may vary
|
||||
* Homing bump feedrate (mm/s)
|
||||
*/
|
||||
inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
if (axis == Z_AXIS) return Z_PROBE_SPEED_SLOW;
|
||||
if (axis == Z_AXIS) return MMM_TO_MMS(Z_PROBE_SPEED_SLOW);
|
||||
#endif
|
||||
static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR;
|
||||
uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]);
|
||||
|
@ -1294,7 +1294,7 @@ void homeaxis(const AxisEnum axis) {
|
|||
// When homing Z with probe respect probe clearance
|
||||
const float bump = axis_home_dir * (
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
(axis == Z_AXIS && Z_HOME_BUMP_MM) ? max(Z_CLEARANCE_BETWEEN_PROBES, home_bump_mm(Z_AXIS)) :
|
||||
(axis == Z_AXIS && (Z_HOME_BUMP_MM)) ? max(Z_CLEARANCE_BETWEEN_PROBES, Z_HOME_BUMP_MM) :
|
||||
#endif
|
||||
home_bump_mm(axis)
|
||||
);
|
||||
|
@ -1305,7 +1305,11 @@ void homeaxis(const AxisEnum axis) {
|
|||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Move Away:");
|
||||
#endif
|
||||
do_homing_move(axis, -bump);
|
||||
do_homing_move(axis, -bump
|
||||
#if HOMING_Z_WITH_PROBE
|
||||
, MMM_TO_MMS(Z_PROBE_SPEED_FAST)
|
||||
#endif
|
||||
);
|
||||
|
||||
// Slow move towards endstop until triggered
|
||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
|
|
|
@ -568,7 +568,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
|
|||
#if MULTIPLE_PROBING == 2
|
||||
|
||||
// Do a first probe at the fast speed
|
||||
if (do_probe_move(z_probe_low_point, Z_PROBE_SPEED_FAST)) return NAN;
|
||||
if (do_probe_move(z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_FAST))) return NAN;
|
||||
|
||||
float first_probe_z = current_position[Z_AXIS];
|
||||
|
||||
|
@ -588,7 +588,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
|
|||
|
||||
if (current_position[Z_AXIS] > z) {
|
||||
// If we don't make it to the z position (i.e. the probe triggered), move up to make clearance for the probe
|
||||
if (!do_probe_move(z, Z_PROBE_SPEED_FAST))
|
||||
if (!do_probe_move(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST)))
|
||||
do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
|
||||
}
|
||||
#endif
|
||||
|
@ -599,7 +599,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
|
|||
#endif
|
||||
|
||||
// Move down slowly to find bed, not too far
|
||||
if (do_probe_move(z_probe_low_point, Z_PROBE_SPEED_SLOW)) return NAN;
|
||||
if (do_probe_move(z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_SLOW))) return NAN;
|
||||
|
||||
#if MULTIPLE_PROBING > 2
|
||||
probes_total += current_position[Z_AXIS];
|
||||
|
|
Reference in a new issue