IDEX clean up (#11690)
This commit is contained in:
@ -174,6 +174,11 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
bool IDEX_saved_duplication_state = extruder_duplication_enabled;
|
||||
DualXMode IDEX_saved_mode = dual_x_carriage_mode;
|
||||
#endif
|
||||
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
if (parser.seen('S')) {
|
||||
LOOP_XYZ(a) set_axis_is_at_home((AxisEnum)a);
|
||||
@ -229,7 +234,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
tool_change(0, 0, true);
|
||||
#endif
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
||||
extruder_duplication_enabled = false;
|
||||
#endif
|
||||
|
||||
@ -354,6 +359,39 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
|
||||
#endif // !DELTA (G28)
|
||||
|
||||
/**
|
||||
*
|
||||
* This code block allows the DXC mode to survive (and function) across a G28 if it is an IDEX
|
||||
* machine and the printer is currently in DXC_DUPLICATION_MODE.
|
||||
* This is important because it lets a user use the LCD Panel to set an IDEX Duplication mode, and
|
||||
* then print a standard GCode file that contains a single print that does a G28 and has no other
|
||||
* IDEX specific commands in it.
|
||||
*
|
||||
**/
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) {
|
||||
|
||||
// Always home the 2nd (right) extruder first
|
||||
active_extruder = 1;
|
||||
homeaxis(X_AXIS);
|
||||
|
||||
// Remember this extruder's position for later tool change
|
||||
inactive_extruder_x_pos = current_position[X_AXIS];
|
||||
|
||||
// Home the 1st (left) extruder
|
||||
active_extruder = 0;
|
||||
homeaxis(X_AXIS);
|
||||
|
||||
// Consider the active extruder to be parked
|
||||
COPY(raised_parked_position, current_position);
|
||||
delayed_move_time = 0;
|
||||
active_extruder_parked = true;
|
||||
extruder_duplication_enabled = IDEX_saved_duplication_state;
|
||||
dual_x_carriage_mode = IDEX_saved_mode;
|
||||
}
|
||||
#endif
|
||||
|
||||
endstops.not_homing();
|
||||
|
||||
#if ENABLED(DELTA) && ENABLED(DELTA_HOME_TO_SAFE_ZONE)
|
||||
|
Reference in New Issue
Block a user