Kaynağa Gözat

Fix homing with probe feedrates

Scott Lahteine 7 yıl önce
ebeveyn
işleme
4dfc011d86
2 değiştirilmiş dosya ile 11 ekleme ve 7 silme
  1. 8
    4
      Marlin/src/module/motion.cpp
  2. 3
    3
      Marlin/src/module/probe.cpp

+ 8
- 4
Marlin/src/module/motion.cpp Dosyayı Görüntüle

@@ -985,11 +985,11 @@ void prepare_move_to_destination() {
985 985
 #endif // HAS_AXIS_UNHOMED_ERR
986 986
 
987 987
 /**
988
- * The homing feedrate may vary
988
+ * Homing bump feedrate (mm/s)
989 989
  */
990 990
 inline float get_homing_bump_feedrate(const AxisEnum axis) {
991 991
   #if HOMING_Z_WITH_PROBE
992
-    if (axis == Z_AXIS) return Z_PROBE_SPEED_SLOW;
992
+    if (axis == Z_AXIS) return MMM_TO_MMS(Z_PROBE_SPEED_SLOW);
993 993
   #endif
994 994
   static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR;
995 995
   uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]);
@@ -1294,7 +1294,7 @@ void homeaxis(const AxisEnum axis) {
1294 1294
   // When homing Z with probe respect probe clearance
1295 1295
   const float bump = axis_home_dir * (
1296 1296
     #if HOMING_Z_WITH_PROBE
1297
-      (axis == Z_AXIS && Z_HOME_BUMP_MM) ? max(Z_CLEARANCE_BETWEEN_PROBES, home_bump_mm(Z_AXIS)) :
1297
+      (axis == Z_AXIS && (Z_HOME_BUMP_MM)) ? max(Z_CLEARANCE_BETWEEN_PROBES, Z_HOME_BUMP_MM) :
1298 1298
     #endif
1299 1299
     home_bump_mm(axis)
1300 1300
   );
@@ -1305,7 +1305,11 @@ void homeaxis(const AxisEnum axis) {
1305 1305
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1306 1306
       if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Move Away:");
1307 1307
     #endif
1308
-    do_homing_move(axis, -bump);
1308
+    do_homing_move(axis, -bump
1309
+      #if HOMING_Z_WITH_PROBE
1310
+        , MMM_TO_MMS(Z_PROBE_SPEED_FAST)
1311
+      #endif
1312
+    );
1309 1313
 
1310 1314
     // Slow move towards endstop until triggered
1311 1315
     #if ENABLED(DEBUG_LEVELING_FEATURE)

+ 3
- 3
Marlin/src/module/probe.cpp Dosyayı Görüntüle

@@ -568,7 +568,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
568 568
   #if MULTIPLE_PROBING == 2
569 569
 
570 570
     // Do a first probe at the fast speed
571
-    if (do_probe_move(z_probe_low_point, Z_PROBE_SPEED_FAST)) return NAN;
571
+    if (do_probe_move(z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_FAST))) return NAN;
572 572
 
573 573
     float first_probe_z = current_position[Z_AXIS];
574 574
 
@@ -588,7 +588,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
588 588
 
589 589
     if (current_position[Z_AXIS] > z) {
590 590
       // If we don't make it to the z position (i.e. the probe triggered), move up to make clearance for the probe
591
-      if (!do_probe_move(z, Z_PROBE_SPEED_FAST))
591
+      if (!do_probe_move(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST)))
592 592
         do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
593 593
     }
594 594
   #endif
@@ -599,7 +599,7 @@ static bool do_probe_move(const float z, const float fr_mm_m) {
599 599
   #endif
600 600
 
601 601
       // Move down slowly to find bed, not too far
602
-      if (do_probe_move(z_probe_low_point, Z_PROBE_SPEED_SLOW)) return NAN;
602
+      if (do_probe_move(z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_SLOW))) return NAN;
603 603
 
604 604
   #if MULTIPLE_PROBING > 2
605 605
       probes_total += current_position[Z_AXIS];

Loading…
İptal
Kaydet