From 4dfc011d86b8a271fca23b42a8cb73902d622fb2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 30 Apr 2018 03:35:07 -0500 Subject: [PATCH] Fix homing with probe feedrates --- Marlin/src/module/motion.cpp | 12 ++++++++---- Marlin/src/module/probe.cpp | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 0ec1a4c370..47d07c8ce2 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -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) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index a1256994a8..a0dd4d0bab 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -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];