浏览代码

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

Thomas Moore 7 年前
父节点
当前提交
3db35ba9be

+ 9
- 6
Marlin/src/feature/pause.cpp 查看文件

119
 static void do_pause_e_move(const float &length, const float &fr) {
119
 static void do_pause_e_move(const float &length, const float &fr) {
120
   set_destination_from_current();
120
   set_destination_from_current();
121
   destination[E_AXIS] += length / planner.e_factor[active_extruder];
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
   stepper.synchronize();
123
   stepper.synchronize();
124
   set_current_from_destination();
124
   set_current_from_destination();
125
 }
125
 }
137
  * Returns 'true' if load was completed, 'false' for abort
137
  * Returns 'true' if load was completed, 'false' for abort
138
  */
138
  */
139
 bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
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
   #if DISABLED(ULTIPANEL)
143
   #if DISABLED(ULTIPANEL)
144
     UNUSED(show_lcd);
144
     UNUSED(show_lcd);
232
  * Returns 'true' if unload was completed, 'false' for abort
232
  * Returns 'true' if unload was completed, 'false' for abort
233
  */
233
  */
234
 bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
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
   if (!ensure_safe_temperature(mode)) {
237
   if (!ensure_safe_temperature(mode)) {
238
     #if ENABLED(ULTIPANEL)
238
     #if ENABLED(ULTIPANEL)
336
   if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
336
   if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
337
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
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
   // Unload the filament
345
   // Unload the filament
343
   if (unload_length)
346
   if (unload_length)

+ 1
- 1
Marlin/src/gcode/feature/pause/M603.cpp 查看文件

41
  *  L[distance] - Extrude distance for insertion, for the specified extruder
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
   if (get_target_extruder_from_command()) return;
46
   if (get_target_extruder_from_command()) return;
47
 
47
 

+ 10
- 0
Marlin/src/gcode/feature/pause/M701_M702.cpp 查看文件

50
 void GcodeSuite::M701() {
50
 void GcodeSuite::M701() {
51
   point_t park_point = NOZZLE_PARK_POINT;
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
   if (get_target_extruder_from_command()) return;
58
   if (get_target_extruder_from_command()) return;
54
 
59
 
55
   // Z axis lift
60
   // Z axis lift
107
 void GcodeSuite::M702() {
112
 void GcodeSuite::M702() {
108
   point_t park_point = NOZZLE_PARK_POINT;
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
   if (get_target_extruder_from_command()) return;
120
   if (get_target_extruder_from_command()) return;
111
 
121
 
112
   // Z axis lift
122
   // Z axis lift

+ 5
- 5
Marlin/src/gcode/gcode.cpp 查看文件

633
       #endif
633
       #endif
634
 
634
 
635
       #if ENABLED(ADVANCED_PAUSE_FEATURE)
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
       #endif // ADVANCED_PAUSE_FEATURE
638
       #endif // ADVANCED_PAUSE_FEATURE
640
 
639
 
641
       #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
640
       #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
642
         case 605: M605(); break;  // M605: Set Dual X Carriage movement mode
641
         case 605: M605(); break;  // M605: Set Dual X Carriage movement mode
643
       #endif
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
       #endif
647
       #endif
648
 
648
 
649
       #if ENABLED(LIN_ADVANCE)
649
       #if ENABLED(LIN_ADVANCE)

+ 6
- 0
Marlin/src/inc/Conditionals_post.h 查看文件

1249
     #endif
1249
     #endif
1250
   #endif
1250
   #endif
1251
 #endif
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
 // Force SDCARD_SORT_ALPHA to be enabled for Graphical LCD on LPC1768
1259
 // Force SDCARD_SORT_ALPHA to be enabled for Graphical LCD on LPC1768
1254
 // because of a bug in the shared SPI implementation. (See #8122)
1260
 // because of a bug in the shared SPI implementation. (See #8122)

正在加载...
取消
保存