Browse Source

Fix homing with probe feedrates

pull/1/head
Scott Lahteine 7 years ago
parent
commit
4dfc011d86
  1. 12
      Marlin/src/module/motion.cpp
  2. 6
      Marlin/src/module/probe.cpp

12
Marlin/src/module/motion.cpp

@ -985,11 +985,11 @@ void prepare_move_to_destination() {
#endif // HAS_AXIS_UNHOMED_ERR #endif // HAS_AXIS_UNHOMED_ERR
/** /**
* The homing feedrate may vary * Homing bump feedrate (mm/s)
*/ */
inline float get_homing_bump_feedrate(const AxisEnum axis) { inline float get_homing_bump_feedrate(const AxisEnum axis) {
#if HOMING_Z_WITH_PROBE #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 #endif
static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR; static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR;
uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]); 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 // When homing Z with probe respect probe clearance
const float bump = axis_home_dir * ( const float bump = axis_home_dir * (
#if HOMING_Z_WITH_PROBE #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 #endif
home_bump_mm(axis) home_bump_mm(axis)
); );
@ -1305,7 +1305,11 @@ void homeaxis(const AxisEnum axis) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Move Away:"); if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Move Away:");
#endif #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 // Slow move towards endstop until triggered
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)

6
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 #if MULTIPLE_PROBING == 2
// Do a first probe at the fast speed // 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]; 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 (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 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)); do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
} }
#endif #endif
@ -599,7 +599,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
#endif #endif
// Move down slowly to find bed, not too far // 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 #if MULTIPLE_PROBING > 2
probes_total += current_position[Z_AXIS]; probes_total += current_position[Z_AXIS];

Loading…
Cancel
Save