Browse Source

Update IDEX menus, add post-M605 event G-code (#20133)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
InsanityAutomation 4 years ago
parent
commit
e955dce3dc
No account linked to committer's email address

+ 3
- 0
Marlin/Configuration_adv.h View File

637
 
637
 
638
   // Default x offset in duplication mode (typically set to half print bed width)
638
   // Default x offset in duplication mode (typically set to half print bed width)
639
   #define DEFAULT_DUPLICATION_X_OFFSET 100
639
   #define DEFAULT_DUPLICATION_X_OFFSET 100
640
+
641
+  // Default action to execute following M605 mode change commands. Typically G28X to apply new mode.
642
+  //#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
640
 #endif
643
 #endif
641
 
644
 
642
 // Activate a solenoid on the active extruder with M380. Disable all with M381.
645
 // Activate a solenoid on the active extruder with M380. Disable all with M381.

+ 4
- 0
Marlin/src/gcode/control/M605.cpp View File

103
       }
103
       }
104
       idex_set_parked(false);
104
       idex_set_parked(false);
105
       set_duplication_enabled(false);
105
       set_duplication_enabled(false);
106
+
107
+      #ifdef EVENT_GCODE_IDEX_AFTER_MODECHANGE
108
+        gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_IDEX_AFTER_MODECHANGE));
109
+      #endif
106
     }
110
     }
107
     else if (!parser.seen('W'))  // if no S or W parameter, the DXC mode gets reset to the user's default
111
     else if (!parser.seen('W'))  // if no S or W parameter, the DXC mode gets reset to the user's default
108
       dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
112
       dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;

+ 1
- 0
Marlin/src/lcd/language/language_en.h View File

144
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplication");
144
   PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE             = _UxGT("Duplication");
145
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Mirrored Copy");
145
   PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY         = _UxGT("Mirrored Copy");
146
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Full Control");
146
   PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL             = _UxGT("Full Control");
147
+  PROGMEM Language_Str MSG_IDEX_DUPE_GAP                   = _UxGT("Duplicate X-Gap");
147
   PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2nd Nozzle X");
148
   PROGMEM Language_Str MSG_HOTEND_OFFSET_X                 = _UxGT("2nd Nozzle X");
148
   PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2nd Nozzle Y");
149
   PROGMEM Language_Str MSG_HOTEND_OFFSET_Y                 = _UxGT("2nd Nozzle Y");
149
   PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2nd Nozzle Z");
150
   PROGMEM Language_Str MSG_HOTEND_OFFSET_Z                 = _UxGT("2nd Nozzle Z");

+ 9
- 6
Marlin/src/lcd/menu/menu_configuration.cpp View File

194
     START_MENU();
194
     START_MENU();
195
     BACK_ITEM(MSG_CONFIGURATION);
195
     BACK_ITEM(MSG_CONFIGURATION);
196
 
196
 
197
-    GCODES_ITEM(MSG_IDEX_MODE_AUTOPARK,  PSTR("M605 S1\nG28 X\nG1 X100"));
197
+    GCODES_ITEM(MSG_IDEX_MODE_AUTOPARK,  PSTR("M605S1\nG28X\nG1X0"));
198
     GCODES_ITEM(MSG_IDEX_MODE_DUPLICATE, need_g28
198
     GCODES_ITEM(MSG_IDEX_MODE_DUPLICATE, need_g28
199
-      ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100")                // If Y or Z is not homed, do a full G28 first
200
-      : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100")
199
+      ? PSTR("M605S1\nT0\nG28\nM605S2\nG28X\nG1X0")         // If Y or Z is not homed, do a full G28 first
200
+      : PSTR("M605S1\nT0\nM605S2\nG28X\nG1X0")
201
     );
201
     );
202
     GCODES_ITEM(MSG_IDEX_MODE_MIRRORED_COPY, need_g28
202
     GCODES_ITEM(MSG_IDEX_MODE_MIRRORED_COPY, need_g28
203
-      ? PSTR("M605 S1\nT0\nG28\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")  // If Y or Z is not homed, do a full G28 first
204
-      : PSTR("M605 S1\nT0\nM605 S2 X200\nG28 X\nG1 X100\nM605 S3 X200")
203
+      ? PSTR("M605S1\nT0\nG28\nM605S2\nG28X\nG1X0\nM605S3") // If Y or Z is not homed, do a full G28 first
204
+      : PSTR("M605S1\nT0\nM605S2\nG28 X\nG1X0\nM605S3")
205
     );
205
     );
206
-    GCODES_ITEM(MSG_IDEX_MODE_FULL_CTRL, PSTR("M605 S0\nG28 X"));
206
+    GCODES_ITEM(MSG_IDEX_MODE_FULL_CTRL, PSTR("M605S0\nG28X"));
207
+
208
+    EDIT_ITEM(float42_52, MSG_IDEX_DUPE_GAP, &duplicate_extruder_x_offset, (X2_MIN_POS) - (X1_MIN_POS), (X_BED_SIZE) - 20);
209
+
207
     END_MENU();
210
     END_MENU();
208
   }
211
   }
209
 
212
 

+ 3
- 3
buildroot/tests/mega2560-tests View File

259
 
259
 
260
 ######## Example Configurations ##############
260
 ######## Example Configurations ##############
261
 #
261
 #
262
-# Test a full-featured CR-10S config
262
+# Test a basic DUAL_X_CARRIAGE configuration
263
 #
263
 #
264
-use_example_configs Creality/CR-10S
265
-exec_test $1 $2 "Full-featured CR-10S config"
264
+use_example_configs Formbot/T_Rex_3
265
+exec_test $1 $2 "Formbot/T_Rex_3 example configuration."
266
 
266
 
267
 #
267
 #
268
 # BQ Hephestos 2
268
 # BQ Hephestos 2

Loading…
Cancel
Save