Procházet zdrojové kódy

Add NOZZLE_PARK_Z_RAISE_MIN (#17624)

Ondřej Nový před 4 roky
rodič
revize
d2a5d51f69
No account linked to committer's email address

+ 2
- 1
Marlin/Configuration.h Zobrazit soubor

@@ -1501,8 +1501,9 @@
1501 1501
 #if ENABLED(NOZZLE_PARK_FEATURE)
1502 1502
   // Specify a park position as { X, Y, Z_raise }
1503 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 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 1507
 #endif
1507 1508
 
1508 1509
 /**

+ 1
- 1
Marlin/src/feature/mmu2/mmu2.cpp Zobrazit soubor

@@ -575,7 +575,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
575 575
         resume_position = current_position;
576 576
 
577 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 580
         if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder);
581 581
 

+ 1
- 1
Marlin/src/feature/pause.cpp Zobrazit soubor

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

+ 9
- 2
Marlin/src/libs/nozzle.cpp Zobrazit soubor

@@ -177,8 +177,15 @@ Nozzle nozzle;
177 177
         do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z);
178 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 191
     do_blocking_move_to_xy(park, fr_xy);

Loading…
Zrušit
Uložit