Skip to content

Commit

Permalink
Separate Dual X un-park from movement
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 11, 2017
1 parent eca1509 commit 7c1adff
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12824,13 +12824,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#if ENABLED(DUAL_X_CARRIAGE)

/**
* Prepare a linear move in a dual X axis setup
* Unpark the carriage, if needed
*/
inline bool prepare_move_to_destination_dualx() {
if (active_extruder_parked) {
inline bool dual_x_carriage_unpark() {
if (active_extruder_parked)
switch (dual_x_carriage_mode) {
case DXC_FULL_CONTROL_MODE:
break;

case DXC_FULL_CONTROL_MODE: break;

case DXC_AUTO_PARK_MODE:
if (current_position[E_AXIS] == destination[E_AXIS]) {
// This is a travel move (with no extrusion)
Expand Down Expand Up @@ -12859,6 +12860,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Clear active_extruder_parked");
#endif
break;

case DXC_DUPLICATION_MODE:
if (active_extruder == 0) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
Expand Down Expand Up @@ -12894,14 +12896,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
}
break;
}
}
return (
#if UBL_SEGMENTED
ubl.prepare_segmented_line_to(destination, MMS_SCALED(feedrate_mm_s))
#else
prepare_move_to_destination_cartesian()
#endif
);
return false;
}

#endif // DUAL_X_CARRIAGE
Expand Down Expand Up @@ -12942,10 +12937,12 @@ void prepare_move_to_destination() {

#endif

#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_unpark()) return;
#endif

if (
#if ENABLED(DUAL_X_CARRIAGE)
prepare_move_to_destination_dualx()
#elif UBL_SEGMENTED
#if UBL_SEGMENTED
ubl.prepare_segmented_line_to(destination, MMS_SCALED(feedrate_mm_s))
#elif IS_KINEMATIC
prepare_kinematic_move_to(destination)
Expand Down

0 comments on commit 7c1adff

Please sign in to comment.