浏览代码

Add Z_AFTER_HOMING to raise Z more in G28 (#16755)

Scott Lahteine 4 年前
父节点
当前提交
72b4d91d2e
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 18 次插入9 次删除
  1. 6
    4
      Marlin/Configuration.h
  2. 9
    1
      Marlin/src/gcode/calibrate/G28.cpp
  3. 3
    4
      Marlin/src/module/motion.cpp

+ 6
- 4
Marlin/Configuration.h 查看文件

1065
 
1065
 
1066
 // @section homing
1066
 // @section homing
1067
 
1067
 
1068
-//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
1068
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
1069
 
1069
 
1070
-//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
1070
+//#define UNKNOWN_Z_NO_RAISE      // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
1071
 
1071
 
1072
-//#define Z_HOMING_HEIGHT 4  // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
1073
-                             // Be sure you have this distance over your Z_MAX_POS in case.
1072
+//#define Z_HOMING_HEIGHT  4      // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
1073
+                                  // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
1074
+
1075
+//#define Z_AFTER_HOMING  10      // (mm) Height to move to after homing Z
1074
 
1076
 
1075
 // Direction of endstops when homing; 1=MAX, -1=MIN
1077
 // Direction of endstops when homing; 1=MAX, -1=MIN
1076
 // :[-1,1]
1078
 // :[-1,1]

+ 9
- 1
Marlin/src/gcode/calibrate/G28.cpp 查看文件

405
 
405
 
406
     // Home Z last if homing towards the bed
406
     // Home Z last if homing towards the bed
407
     #if Z_HOME_DIR < 0
407
     #if Z_HOME_DIR < 0
408
+
408
       if (doZ) {
409
       if (doZ) {
409
         #if ENABLED(BLTOUCH)
410
         #if ENABLED(BLTOUCH)
410
           bltouch.init();
411
           bltouch.init();
416
         #endif
417
         #endif
417
 
418
 
418
         #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
419
         #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
419
-          probe.move_z_after_probing();
420
+          #if Z_AFTER_HOMING > Z_AFTER_PROBING
421
+            do_blocking_move_to_z(Z_AFTER_HOMING);
422
+          #else
423
+            probe.move_z_after_probing();
424
+          #endif
425
+        #elif defined(Z_AFTER_HOMING)
426
+          do_blocking_move_to_z(Z_AFTER_HOMING);
420
         #endif
427
         #endif
421
 
428
 
422
       } // doZ
429
       } // doZ
430
+
423
     #endif // Z_HOME_DIR < 0
431
     #endif // Z_HOME_DIR < 0
424
 
432
 
425
     sync_plan_position();
433
     sync_plan_position();

+ 3
- 4
Marlin/src/module/motion.cpp 查看文件

1755
   #endif
1755
   #endif
1756
 
1756
 
1757
   #if DISABLED(DELTA) && defined(HOMING_BACKOFF_MM)
1757
   #if DISABLED(DELTA) && defined(HOMING_BACKOFF_MM)
1758
-    constexpr xyz_float_t endstop_backoff = HOMING_BACKOFF_MM;
1759
-    const float backoff_mm = endstop_backoff[axis];
1760
-    if (backoff_mm) {
1761
-      current_position[axis] -= ABS(backoff_mm) * axis_home_dir;
1758
+    const xyz_float_t endstop_backoff = HOMING_BACKOFF_MM;
1759
+    if (endstop_backoff[axis]) {
1760
+      current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir;
1762
       line_to_current_position(
1761
       line_to_current_position(
1763
         #if HOMING_Z_WITH_PROBE
1762
         #if HOMING_Z_WITH_PROBE
1764
           (axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) :
1763
           (axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) :

正在加载...
取消
保存