Kaynağa Gözat

Fix IDEX tool-change, and more (#13614)

InsanityAutomation 6 yıl önce
ebeveyn
işleme
4900c28bf6

+ 1
- 1
Marlin/src/gcode/motion/M290.cpp Dosyayı Görüntüle

@@ -50,7 +50,7 @@
50 50
       else {
51 51
         hotend_offset[Z_AXIS][active_extruder] -= offs;
52 52
         SERIAL_ECHO_START();
53
-        SERIAL_ECHOLNPAIR(MSG_IDEX_Z_OFFSET ": ", hotend_offset[Z_AXIS][active_extruder]);
53
+        SERIAL_ECHOLNPAIR(MSG_Z_OFFSET ": ", hotend_offset[Z_AXIS][active_extruder]);
54 54
       }
55 55
     #endif
56 56
   }

+ 3
- 4
Marlin/src/lcd/language/language_de.h Dosyayı Görüntüle

@@ -101,10 +101,9 @@
101 101
 #define MSG_IDEX_MODE_DUPLICATE             _UxGT("Duplizieren")
102 102
 #define MSG_IDEX_MODE_MIRRORED_COPY         _UxGT("Spiegelkopie")
103 103
 #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("vollstä. Kontrolle")
104
-#define MSG_IDEX_X_OFFSET                   _UxGT("2. Düse X")
105
-#define MSG_IDEX_Y_OFFSET                   _UxGT("2. Düse Y")
106
-#define MSG_IDEX_Z_OFFSET                   _UxGT("2. Düse Z")
107
-#define MSG_IDEX_SAVE_OFFSETS               _UxGT("Versätze speichern")
104
+#define MSG_X_OFFSET                        _UxGT("2. Düse X")
105
+#define MSG_Y_OFFSET                        _UxGT("2. Düse Y")
106
+#define MSG_Z_OFFSET                        _UxGT("2. Düse Z")
108 107
 #define MSG_UBL_MANUAL_MESH                 _UxGT("Netz manuell erst.")
109 108
 #define MSG_UBL_BC_INSERT                   _UxGT("Unterlegen & messen")
110 109
 #define MSG_UBL_BC_INSERT2                  _UxGT("Messen")

+ 9
- 9
Marlin/src/lcd/language/language_en.h Dosyayı Görüntüle

@@ -247,6 +247,9 @@
247 247
 #ifndef MSG_IDEX_MENU
248 248
   #define MSG_IDEX_MENU                       _UxGT("IDEX Mode")
249 249
 #endif
250
+#ifndef MSG_OFFSETS_MENU
251
+  #define MSG_OFFSETS_MENU                    _UxGT("Tool Offsets")
252
+#endif
250 253
 #ifndef MSG_IDEX_MODE_AUTOPARK
251 254
   #define MSG_IDEX_MODE_AUTOPARK              _UxGT("Auto-Park")
252 255
 #endif
@@ -259,17 +262,14 @@
259 262
 #ifndef MSG_IDEX_MODE_FULL_CTRL
260 263
   #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("Full control")
261 264
 #endif
262
-#ifndef MSG_IDEX_X_OFFSET
263
-  #define MSG_IDEX_X_OFFSET                   _UxGT("2nd nozzle X")
264
-#endif
265
-#ifndef MSG_IDEX_Y_OFFSET
266
-  #define MSG_IDEX_Y_OFFSET                   _UxGT("2nd nozzle Y")
265
+#ifndef MSG_X_OFFSET
266
+  #define MSG_X_OFFSET                        _UxGT("2nd nozzle X")
267 267
 #endif
268
-#ifndef MSG_IDEX_Z_OFFSET
269
-  #define MSG_IDEX_Z_OFFSET                   _UxGT("2nd nozzle Z")
268
+#ifndef MSG_Y_OFFSET
269
+  #define MSG_Y_OFFSET                        _UxGT("2nd nozzle Y")
270 270
 #endif
271
-#ifndef MSG_IDEX_SAVE_OFFSETS
272
-  #define MSG_IDEX_SAVE_OFFSETS               _UxGT("Save Offsets")
271
+#ifndef MSG_Z_OFFSET
272
+  #define MSG_Z_OFFSET                        _UxGT("2nd nozzle Z")
273 273
 #endif
274 274
 #ifndef MSG_UBL_MANUAL_MESH
275 275
   #define MSG_UBL_MANUAL_MESH                 _UxGT("Manually Build Mesh")

+ 3
- 4
Marlin/src/lcd/language/language_it.h Dosyayı Görüntüle

@@ -99,10 +99,9 @@
99 99
 #define MSG_IDEX_MODE_DUPLICATE             _UxGT("Duplicazione")
100 100
 #define MSG_IDEX_MODE_MIRRORED_COPY         _UxGT("Copia speculare")
101 101
 #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("Pieno controllo")
102
-#define MSG_IDEX_X_OFFSET                   _UxGT("2° ugello X")
103
-#define MSG_IDEX_Y_OFFSET                   _UxGT("2° ugello Y")
104
-#define MSG_IDEX_Z_OFFSET                   _UxGT("2° ugello Z")
105
-#define MSG_IDEX_SAVE_OFFSETS               _UxGT("Memorizza Offsets")
102
+#define MSG_X_OFFSET                        _UxGT("2° ugello X")
103
+#define MSG_Y_OFFSET                        _UxGT("2° ugello Y")
104
+#define MSG_Z_OFFSET                        _UxGT("2° ugello Z")
106 105
 #define MSG_UBL_MANUAL_MESH                 _UxGT("Mesh Manuale")
107 106
 #define MSG_UBL_BC_INSERT                   _UxGT("Metti spes. e misura")
108 107
 #define MSG_UBL_BC_INSERT2                  _UxGT("Misura")

+ 3
- 4
Marlin/src/lcd/language/language_ko_KR.h Dosyayı Görüntüle

@@ -90,10 +90,9 @@
90 90
 #define MSG_IDEX_MODE_DUPLICATE             _UxGT("Duplication")
91 91
 #define MSG_IDEX_MODE_MIRRORED_COPY         _UxGT("미러 사본")
92 92
 #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("Full control")
93
-#define MSG_IDEX_X_OFFSET                   _UxGT("2nd nozzle X")
94
-#define MSG_IDEX_Y_OFFSET                   _UxGT("2nd nozzle Y")
95
-#define MSG_IDEX_Z_OFFSET                   _UxGT("2nd nozzle Z")
96
-#define MSG_IDEX_SAVE_OFFSETS               _UxGT("Save Offsets")
93
+#define MSG_X_OFFSET                        _UxGT("2nd nozzle X")
94
+#define MSG_Y_OFFSET                        _UxGT("2nd nozzle Y")
95
+#define MSG_Z_OFFSET                        _UxGT("2nd nozzle Z")
97 96
 #define MSG_UBL_MANUAL_MESH                 _UxGT("Manually Build Mesh")
98 97
 #define MSG_UBL_BC_INSERT                   _UxGT("Place shim & measure")
99 98
 #define MSG_UBL_BC_INSERT2                  _UxGT("Measure")

+ 3
- 4
Marlin/src/lcd/language/language_pt-br.h Dosyayı Görüntüle

@@ -101,10 +101,9 @@
101 101
 #define MSG_IDEX_MODE_DUPLICATE             _UxGT("Duplicação")
102 102
 #define MSG_IDEX_MODE_MIRRORED_COPY         _UxGT("Cópia espelhada")
103 103
 #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("Controle Total")
104
-#define MSG_IDEX_X_OFFSET                   _UxGT("2o bico X")
105
-#define MSG_IDEX_Y_OFFSET                   _UxGT("2o bico Y")
106
-#define MSG_IDEX_Z_OFFSET                   _UxGT("2o bico Z")
107
-#define MSG_IDEX_SAVE_OFFSETS               _UxGT("Salvar Compensação")
104
+#define MSG_X_OFFSET                        _UxGT("2o bico X")
105
+#define MSG_Y_OFFSET                        _UxGT("2o bico Y")
106
+#define MSG_Z_OFFSET                        _UxGT("2o bico Z")
108 107
 
109 108
 #define MSG_UBL_MANUAL_MESH                 _UxGT("Fazer malha manual")
110 109
 #define MSG_UBL_BC_INSERT                   _UxGT("Calçar e calibrar")

+ 3
- 4
Marlin/src/lcd/language/language_sk.h Dosyayı Görüntüle

@@ -108,10 +108,9 @@
108 108
 #define MSG_IDEX_MODE_DUPLICATE             _UxGT("Duplikácia")
109 109
 #define MSG_IDEX_MODE_MIRRORED_COPY         _UxGT("Zrkadlená kópia")
110 110
 #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("Plná kontrola")
111
-#define MSG_IDEX_X_OFFSET                   _UxGT("2. tryska X")
112
-#define MSG_IDEX_Y_OFFSET                   _UxGT("2. tryska Y")
113
-#define MSG_IDEX_Z_OFFSET                   _UxGT("2. tryska Z")
114
-#define MSG_IDEX_SAVE_OFFSETS               _UxGT("Uložiť offsety")
111
+#define MSG_X_OFFSET                        _UxGT("2. tryska X")
112
+#define MSG_Y_OFFSET                        _UxGT("2. tryska Y")
113
+#define MSG_Z_OFFSET                        _UxGT("2. tryska Z")
115 114
 #define MSG_UBL_MANUAL_MESH                 _UxGT("Manuálna sieť bodov")
116 115
 #define MSG_UBL_BC_INSERT                   _UxGT("Položte a zmerajte")
117 116
 #define MSG_UBL_BC_INSERT2                  _UxGT("Zmerajte")

+ 3
- 4
Marlin/src/lcd/language/language_tr.h Dosyayı Görüntüle

@@ -100,10 +100,9 @@
100 100
 #define MSG_IDEX_MODE_DUPLICATE             _UxGT("Kopyala")
101 101
 #define MSG_IDEX_MODE_MIRRORED_COPY         _UxGT("Yansıtılmış kopya")
102 102
 #define MSG_IDEX_MODE_FULL_CTRL             _UxGT("Tam Kontrol")
103
-#define MSG_IDEX_X_OFFSET                   _UxGT("2. nozul X")
104
-#define MSG_IDEX_Y_OFFSET                   _UxGT("2. nozul Y")
105
-#define MSG_IDEX_Z_OFFSET                   _UxGT("2. nozul Z")
106
-#define MSG_IDEX_SAVE_OFFSETS               _UxGT("Ofsetleri Kaydet")
103
+#define MSG_X_OFFSET                        _UxGT("2. nozul X")
104
+#define MSG_Y_OFFSET                        _UxGT("2. nozul Y")
105
+#define MSG_Z_OFFSET                        _UxGT("2. nozul Z")
107 106
 #define MSG_UBL_MANUAL_MESH                 _UxGT("Elle Mesh Oluştur")
108 107
 #define MSG_UBL_BC_INSERT                   _UxGT("Altlık & Ölçü Ver")
109 108
 #define MSG_UBL_BC_INSERT2                  _UxGT("Ölçü")

+ 1
- 1
Marlin/src/lcd/menu/menu.cpp Dosyayı Görüntüle

@@ -391,7 +391,7 @@ void MarlinUI::completion_feedback(const bool good/*=true*/) {
391 391
     if (ui.should_draw()) {
392 392
       #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
393 393
         if (!do_probe)
394
-          draw_edit_screen(PSTR(MSG_IDEX_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
394
+          draw_edit_screen(PSTR(MSG_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
395 395
         else
396 396
       #endif
397 397
           draw_edit_screen(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));

+ 28
- 10
Marlin/src/lcd/menu/menu_configuration.cpp Dosyayı Görüntüle

@@ -119,19 +119,37 @@ static void lcd_factory_settings() {
119 119
 
120 120
 #endif
121 121
 
122
-#if ENABLED(DUAL_X_CARRIAGE)
123
-
122
+#if HAS_HOTEND_OFFSET
124 123
   #include "../../module/motion.h"
125 124
   #include "../../gcode/queue.h"
126 125
 
127
-  void _recalc_IDEX_settings() {
128
-    if (active_extruder) {                      // For the 2nd extruder re-home so the next tool-change gets the new offsets.
126
+  void _recalc_offsets() {
127
+    if (active_extruder && all_axes_known()) {  // For the 2nd extruder re-home so the next tool-change gets the new offsets.
129 128
       enqueue_and_echo_commands_P(PSTR("G28")); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
130 129
       active_extruder = 0;
131 130
     }
132 131
   }
133 132
 
134
-  void menu_IDEX() {
133
+  void menu_tool_offsets() {
134
+    START_MENU();
135
+    MENU_BACK(MSG_MAIN);
136
+    #if ENABLED(DUAL_X_CARRIAGE)
137
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], MIN(X2_HOME_POS, X2_MAX_POS) - 25.0, MAX(X2_HOME_POS, X2_MAX_POS) + 25.0, _recalc_offsets);
138
+    #else
139
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_X_OFFSET, &hotend_offset[X_AXIS][1], -10.0, 10.0, _recalc_offsets);
140
+    #endif
141
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_Y_OFFSET, &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_offsets);
142
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_Z_OFFSET, &hotend_offset[Z_AXIS][1], Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
143
+    #if ENABLED(EEPROM_SETTINGS)
144
+      MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings);
145
+    #endif
146
+    END_MENU();
147
+  }
148
+#endif
149
+
150
+#if ENABLED(DUAL_X_CARRIAGE)
151
+
152
+  void menu_idex() {
135 153
     START_MENU();
136 154
     MENU_BACK(MSG_MAIN);
137 155
 
@@ -146,10 +164,6 @@ static void lcd_factory_settings() {
146 164
       : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")
147 165
     );
148 166
     MENU_ITEM(gcode, MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X"));
149
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_X_OFFSET , &hotend_offset[X_AXIS][1], MIN(X2_HOME_POS, X2_MAX_POS) - 25.0, MAX(X2_HOME_POS, X2_MAX_POS) + 25.0, _recalc_IDEX_settings);
150
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_Y_OFFSET , &hotend_offset[Y_AXIS][1], -10.0, 10.0, _recalc_IDEX_settings);
151
-    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_IDEX_Z_OFFSET , &hotend_offset[Z_AXIS][1], -10.0, 10.0, _recalc_IDEX_settings);
152
-    MENU_ITEM(gcode, MSG_IDEX_SAVE_OFFSETS, PSTR("M500"));
153 167
     END_MENU();
154 168
   }
155 169
 
@@ -287,8 +301,12 @@ void menu_configuration() {
287 301
       MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, menu_delta_calibrate);
288 302
     #endif
289 303
 
304
+    #if HAS_HOTEND_OFFSET
305
+      MENU_ITEM(submenu, MSG_OFFSETS_MENU, menu_tool_offsets);
306
+    #endif
307
+
290 308
     #if ENABLED(DUAL_X_CARRIAGE)
291
-      MENU_ITEM(submenu, MSG_IDEX_MENU, menu_IDEX);
309
+      MENU_ITEM(submenu, MSG_IDEX_MENU, menu_idex);
292 310
     #endif
293 311
 
294 312
     #if ENABLED(BLTOUCH)

+ 1
- 19
Marlin/src/module/tool_change.cpp Dosyayı Görüntüle

@@ -121,7 +121,7 @@
121 121
 
122 122
     void move_nozzle_servo(const uint8_t angle_index) {
123 123
       planner.synchronize();
124
-      MOVE_SERVO(SWITCHING_NOZZLE_SERVO_NR, servo_angles[SWITCHING_NOZZLE_SERVO_NR][e]);
124
+      MOVE_SERVO(SWITCHING_NOZZLE_SERVO_NR, servo_angles[SWITCHING_NOZZLE_SERVO_NR][angle_index]);
125 125
       safe_delay(500);
126 126
     }
127 127
 
@@ -519,10 +519,6 @@ inline void invalid_extruder_error(const uint8_t e) {
519 519
       planner.synchronize();
520 520
     }
521 521
 
522
-    // Apply Y & Z extruder offset (X offset is used as home pos with Dual X)
523
-    current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder];
524
-    current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
525
-
526 522
     // Activate the new extruder ahead of calling set_axis_is_at_home!
527 523
     active_extruder = tmp_extruder;
528 524
 
@@ -784,20 +780,6 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
784 780
         lower_nozzle(active_extruder);
785 781
       #endif
786 782
 
787
-      #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) && ADVANCED_PAUSE_RESUME_PRIME != 0
788
-        if (should_swap && !too_cold) {
789
-          const float resume_eaxis = current_position[E_AXIS];
790
-          #if ENABLED(ADVANCED_PAUSE_FEATURE)
791
-            do_pause_e_move(toolchange_settings.swap_length, toolchange_settings.prime_speed);
792
-          #else
793
-            current_position[E_AXIS] += (ADVANCED_PAUSE_RESUME_PRIME) / planner.e_factor[active_extruder];
794
-            planner.buffer_line(current_position, ADVANCED_PAUSE_PURGE_FEEDRATE, active_extruder);
795
-          #endif
796
-          planner.synchronize();
797
-          planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = resume_eaxis));
798
-        }
799
-      #endif
800
-
801 783
     } // (tmp_extruder != active_extruder)
802 784
 
803 785
     planner.synchronize();

Loading…
İptal
Kaydet