Kaynağa Gözat

Use "Tn S1" to change tools without moving

Scott Lahteine 8 yıl önce
ebeveyn
işleme
7fb69e24fb
1 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 4
    2
      Marlin/Marlin_main.cpp

+ 4
- 2
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -6587,6 +6587,7 @@ inline void gcode_M999() {
6587 6587
  * T0-T3: Switch tool, usually switching extruders
6588 6588
  *
6589 6589
  *   F[mm/min] Set the movement feedrate
6590
+ *   S1        Don't move the tool in XY after change
6590 6591
  */
6591 6592
 inline void gcode_T(uint8_t tmp_extruder) {
6592 6593
   if (tmp_extruder >= EXTRUDERS) {
@@ -6613,8 +6614,9 @@ inline void gcode_T(uint8_t tmp_extruder) {
6613 6614
 
6614 6615
   #if HOTENDS > 1
6615 6616
     if (tmp_extruder != active_extruder) {
6617
+      bool no_move = code_seen('S') && code_value_bool();
6616 6618
       // Save current position to return to after applying extruder offset
6617
-      set_destination_to_current();
6619
+      if (!no_move) set_destination_to_current();
6618 6620
       #if ENABLED(DUAL_X_CARRIAGE)
6619 6621
         if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && IsRunning() &&
6620 6622
             (delayed_move_time || current_position[X_AXIS] != x_home_pos(active_extruder))) {
@@ -6717,7 +6719,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
6717 6719
       #endif
6718 6720
 
6719 6721
       // Move to the "old position" (move the extruder into place)
6720
-      if (IsRunning()) prepare_move_to_destination();
6722
+      if (!no_move && IsRunning()) prepare_move_to_destination();
6721 6723
 
6722 6724
     } // (tmp_extruder != active_extruder)
6723 6725
 

Loading…
İptal
Kaydet