Separate Dual X un-park from movement

master
Scott Lahteine 7 years ago
parent eca1509cb2
commit 7c1adff8ad

@ -12824,13 +12824,14 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
#if ENABLED(DUAL_X_CARRIAGE) #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() { inline bool dual_x_carriage_unpark() {
if (active_extruder_parked) { if (active_extruder_parked)
switch (dual_x_carriage_mode) { switch (dual_x_carriage_mode) {
case DXC_FULL_CONTROL_MODE:
break; case DXC_FULL_CONTROL_MODE: break;
case DXC_AUTO_PARK_MODE: case DXC_AUTO_PARK_MODE:
if (current_position[E_AXIS] == destination[E_AXIS]) { if (current_position[E_AXIS] == destination[E_AXIS]) {
// This is a travel move (with no extrusion) // This is a travel move (with no extrusion)
@ -12859,6 +12860,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Clear active_extruder_parked"); if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Clear active_extruder_parked");
#endif #endif
break; break;
case DXC_DUPLICATION_MODE: case DXC_DUPLICATION_MODE:
if (active_extruder == 0) { if (active_extruder == 0) {
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
@ -12894,14 +12896,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
} }
break; break;
} }
} return false;
return (
#if UBL_SEGMENTED
ubl.prepare_segmented_line_to(destination, MMS_SCALED(feedrate_mm_s))
#else
prepare_move_to_destination_cartesian()
#endif
);
} }
#endif // DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE
@ -12942,10 +12937,12 @@ void prepare_move_to_destination() {
#endif #endif
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_unpark()) return;
#endif
if ( if (
#if ENABLED(DUAL_X_CARRIAGE) #if UBL_SEGMENTED
prepare_move_to_destination_dualx()
#elif UBL_SEGMENTED
ubl.prepare_segmented_line_to(destination, MMS_SCALED(feedrate_mm_s)) ubl.prepare_segmented_line_to(destination, MMS_SCALED(feedrate_mm_s))
#elif IS_KINEMATIC #elif IS_KINEMATIC
prepare_kinematic_move_to(destination) prepare_kinematic_move_to(destination)

Loading…
Cancel
Save