Browse Source

Add NOZZLE_PARK_Z_RAISE_MIN (#17624)

Ondřej Nový 5 years ago
parent
commit
d2a5d51f69
No account linked to committer's email address

+ 2
- 1
Marlin/Configuration.h View File

1501
 #if ENABLED(NOZZLE_PARK_FEATURE)
1501
 #if ENABLED(NOZZLE_PARK_FEATURE)
1502
   // Specify a park position as { X, Y, Z_raise }
1502
   // Specify a park position as { X, Y, Z_raise }
1503
   #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
1503
   #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
1504
+  #define NOZZLE_PARK_Z_RAISE_MIN   2   // (mm) Always raise Z by at least this distance
1504
   #define NOZZLE_PARK_XY_FEEDRATE 100   // (mm/s) X and Y axes feedrate (also used for delta Z axis)
1505
   #define NOZZLE_PARK_XY_FEEDRATE 100   // (mm/s) X and Y axes feedrate (also used for delta Z axis)
1505
-  #define NOZZLE_PARK_Z_FEEDRATE 5      // (mm/s) Z axis feedrate (not used for delta printers)
1506
+  #define NOZZLE_PARK_Z_FEEDRATE    5   // (mm/s) Z axis feedrate (not used for delta printers)
1506
 #endif
1507
 #endif
1507
 
1508
 
1508
 /**
1509
 /**

+ 1
- 1
Marlin/src/feature/mmu2/mmu2.cpp View File

575
         resume_position = current_position;
575
         resume_position = current_position;
576
 
576
 
577
         if (move_axes && all_axes_homed())
577
         if (move_axes && all_axes_homed())
578
-          nozzle.park(2, park_point /*= NOZZLE_PARK_POINT*/);
578
+          nozzle.park(0, park_point /*= NOZZLE_PARK_POINT*/);
579
 
579
 
580
         if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder);
580
         if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder);
581
 
581
 

+ 1
- 1
Marlin/src/feature/pause.cpp View File

412
 
412
 
413
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
413
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
414
   if (!axes_need_homing())
414
   if (!axes_need_homing())
415
-    nozzle.park(2, park_point);
415
+    nozzle.park(0, park_point);
416
 
416
 
417
   #if ENABLED(DUAL_X_CARRIAGE)
417
   #if ENABLED(DUAL_X_CARRIAGE)
418
     const int8_t saved_ext        = active_extruder;
418
     const int8_t saved_ext        = active_extruder;

+ 9
- 2
Marlin/src/libs/nozzle.cpp View File

177
         do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
177
         do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
178
         break;
178
         break;
179
 
179
 
180
-      default: // Raise to at least the Z-park height
181
-        do_blocking_move_to_z(_MAX(park.z, current_position.z), fr_z);
180
+      default: {
181
+        // Apply a minimum raise, overriding G27 Z
182
+        const float min_raised_z =_MIN(Z_MAX_POS, current_position.z
183
+          #ifdef NOZZLE_PARK_Z_RAISE_MIN
184
+            + NOZZLE_PARK_Z_RAISE_MIN
185
+          #endif
186
+        );
187
+        do_blocking_move_to_z(_MAX(park.z, min_raised_z), fr_z);
188
+      } break;
182
     }
189
     }
183
 
190
 
184
     do_blocking_move_to_xy(park, fr_xy);
191
     do_blocking_move_to_xy(park, fr_xy);

Loading…
Cancel
Save