From 4f042533a50511ce6ca65c850c91634a8b07ce11 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 9 Dec 2017 05:03:54 -0600 Subject: [PATCH] Fix DUAL_X_CARRIAGE with UBL segmented --- Marlin/Marlin_main.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index fe7cb211c..240d192ed 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -12895,7 +12895,13 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { break; } } - return prepare_move_to_destination_cartesian(); + 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 @@ -12937,12 +12943,12 @@ void prepare_move_to_destination() { #endif if ( - #if UBL_SEGMENTED // Also works for CARTESIAN (smaller segments follow mesh more closely) + #if ENABLED(DUAL_X_CARRIAGE) + prepare_move_to_destination_dualx() + #elif UBL_SEGMENTED ubl.prepare_segmented_line_to(destination, MMS_SCALED(feedrate_mm_s)) #elif IS_KINEMATIC prepare_kinematic_move_to(destination) - #elif ENABLED(DUAL_X_CARRIAGE) - prepare_move_to_destination_dualx() #else prepare_move_to_destination_cartesian() #endif