From f565c9876e17b7f12ff5d43c83e63408f0915dd2 Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Sat, 18 Feb 2023 02:30:14 +0100 Subject: [PATCH] use cartesian_move --- Marlin/src/module/motion.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 0932be285d036..8430a65e29dc5 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1205,7 +1205,13 @@ float get_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool &is_c if (UNEAR_ZERO(cartesian_mm)) return true; // Minimum number of seconds to move the given distance - const float seconds = cartesian_mm / scaled_fr_mm_s; + const float seconds = cartesian_mm / ( + #if BOTH((HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) + cartes_move ? scaled_fr_mm_s : LINEAR_UNIT(scaled_fr_mm_s) + #else + scaled_fr_mm_s + #endif + ); // The number of segments-per-second times the duration // gives the number of segments @@ -1227,6 +1233,7 @@ float get_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool &is_c // Add hints to help optimize the move PlannerHints hints(cartesian_mm * inv_segments); + TERN_(HAS_ROTATIONAL_AXES, hints.cartesian_move = cartes_move); TERN_(FEEDRATE_SCALING, hints.inv_duration = scaled_fr_mm_s / hints.millimeters); /* @@ -1298,6 +1305,7 @@ float get_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool &is_c // Add hints to help optimize the move PlannerHints hints(cartesian_mm * inv_segments); + TERN_(HAS_ROTATIONAL_AXES, hints.cartesian_move = cartes_move); TERN_(FEEDRATE_SCALING, hints.inv_duration = scaled_fr_mm_s / hints.millimeters); //SERIAL_ECHOPGM("mm=", cartesian_mm);