Sfoglia il codice sorgente

[2.0.x] Fix change filament for delta machines (#9295)

Thomas Moore 6 anni fa
parent
commit
3db35ba9be

+ 9
- 6
Marlin/src/feature/pause.cpp Vedi File

@@ -119,7 +119,7 @@ static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_
119 119
 static void do_pause_e_move(const float &length, const float &fr) {
120 120
   set_destination_from_current();
121 121
   destination[E_AXIS] += length / planner.e_factor[active_extruder];
122
-  buffer_line_to_destination(fr);
122
+  planner.buffer_line_kinematic(destination, fr, active_extruder);
123 123
   stepper.synchronize();
124 124
   set_current_from_destination();
125 125
 }
@@ -137,8 +137,8 @@ static void do_pause_e_move(const float &length, const float &fr) {
137 137
  * Returns 'true' if load was completed, 'false' for abort
138 138
  */
139 139
 bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
140
-                          const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
141
-                          const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
140
+                   const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
141
+                   const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
142 142
 ) {
143 143
   #if DISABLED(ULTIPANEL)
144 144
     UNUSED(show_lcd);
@@ -232,7 +232,7 @@ bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0
232 232
  * Returns 'true' if unload was completed, 'false' for abort
233 233
  */
234 234
 bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
235
-                            const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
235
+                     const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
236 236
 ) {
237 237
   if (!ensure_safe_temperature(mode)) {
238 238
     #if ENABLED(ULTIPANEL)
@@ -336,8 +336,11 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
336 336
   if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
337 337
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
338 338
 
339
-  // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
340
-  Nozzle::park(2, park_point);
339
+  #if ENABLED(NO_MOTION_BEFORE_HOMING)
340
+    if (!axis_unhomed_error())
341
+  #endif
342
+      // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
343
+      Nozzle::park(2, park_point);
341 344
 
342 345
   // Unload the filament
343 346
   if (unload_length)

+ 1
- 1
Marlin/src/gcode/feature/pause/M603.cpp Vedi File

@@ -41,7 +41,7 @@
41 41
  *  L[distance] - Extrude distance for insertion, for the specified extruder
42 42
  *
43 43
  */
44
-inline void GcodeSuite::M603() {
44
+void GcodeSuite::M603() {
45 45
 
46 46
   if (get_target_extruder_from_command()) return;
47 47
 

+ 10
- 0
Marlin/src/gcode/feature/pause/M701_M702.cpp Vedi File

@@ -50,6 +50,11 @@
50 50
 void GcodeSuite::M701() {
51 51
   point_t park_point = NOZZLE_PARK_POINT;
52 52
 
53
+  #if ENABLED(NO_MOTION_BEFORE_HOMING)
54
+    // Only raise Z if the machine is homed
55
+    if (axis_unhomed_error()) park_point.z = 0;
56
+  #endif
57
+
53 58
   if (get_target_extruder_from_command()) return;
54 59
 
55 60
   // Z axis lift
@@ -107,6 +112,11 @@ void GcodeSuite::M701() {
107 112
 void GcodeSuite::M702() {
108 113
   point_t park_point = NOZZLE_PARK_POINT;
109 114
 
115
+  #if ENABLED(NO_MOTION_BEFORE_HOMING)
116
+    // Only raise Z if the machine is homed
117
+    if (axis_unhomed_error()) park_point.z = 0;
118
+  #endif
119
+
110 120
   if (get_target_extruder_from_command()) return;
111 121
 
112 122
   // Z axis lift

+ 5
- 5
Marlin/src/gcode/gcode.cpp Vedi File

@@ -633,17 +633,17 @@ void GcodeSuite::process_parsed_command() {
633 633
       #endif
634 634
 
635 635
       #if ENABLED(ADVANCED_PAUSE_FEATURE)
636
-        case 600: // M600: Pause for filament change
637
-          M600();
638
-          break;
636
+        case 600: M600(); break;  // M600: Pause for Filament Change
637
+        case 603: M603(); break;  // M603: Configure Filament Change
639 638
       #endif // ADVANCED_PAUSE_FEATURE
640 639
 
641 640
       #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
642 641
         case 605: M605(); break;  // M605: Set Dual X Carriage movement mode
643 642
       #endif
644 643
 
645
-      #if ENABLED(MK2_MULTIPLEXER)
646
-        case 702: M702(); break;  // M702: Unload all extruders
644
+      #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
645
+        case 701: M701(); break;  // M701: Load Filament
646
+        case 702: M702(); break;  // M702: Unload Filament
647 647
       #endif
648 648
 
649 649
       #if ENABLED(LIN_ADVANCE)

+ 6
- 0
Marlin/src/inc/Conditionals_post.h Vedi File

@@ -1249,6 +1249,12 @@
1249 1249
     #endif
1250 1250
   #endif
1251 1251
 #endif
1252
+  
1253
+// Nozzle park
1254
+#if ENABLED(NOZZLE_PARK_FEATURE) && ENABLED(DELTA)
1255
+  #undef NOZZLE_PARK_Z_FEEDRATE
1256
+  #define NOZZLE_PARK_Z_FEEDRATE NOZZLE_PARK_XY_FEEDRATE
1257
+#endif
1252 1258
 
1253 1259
 // Force SDCARD_SORT_ALPHA to be enabled for Graphical LCD on LPC1768
1254 1260
 // because of a bug in the shared SPI implementation. (See #8122)

Loading…
Annulla
Salva