UBL + DUAL_X_CARRIAGE compatibility

This commit is contained in:
Scott Lahteine 2017-12-09 08:00:47 -06:00
parent 6d0678d963
commit 24f9bec6f4

View file

@ -796,7 +796,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
* *
* Return true if current_position[] was set to destination[] * Return true if current_position[] was set to destination[]
*/ */
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: case DXC_FULL_CONTROL_MODE:
@ -865,7 +865,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
break; break;
} }
} }
return prepare_move_to_destination_cartesian(); return false;
} }
#endif // DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE
@ -906,13 +906,15 @@ void prepare_move_to_destination() {
#endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE #endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_unpark()) return;
#endif
if ( if (
#if UBL_SEGMENTED #if 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)
#elif ENABLED(DUAL_X_CARRIAGE)
prepare_move_to_destination_dualx()
#else #else
prepare_move_to_destination_cartesian() prepare_move_to_destination_cartesian()
#endif #endif