From bdcd3b762ae5cb9259ffbd6246112af896ab55ac Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Wed, 11 May 2022 00:06:23 +0200 Subject: [PATCH] motion: Fix motion::triple_move step count limit Do not assume any step can be merged while moving three axes at the same time. Use the worst case scenario involving indepedent parameters for each axis. --- tests/unit/modules/motion/test_motion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/modules/motion/test_motion.cpp b/tests/unit/modules/motion/test_motion.cpp index 60bb1e8..3317243 100644 --- a/tests/unit/modules/motion/test_motion.cpp +++ b/tests/unit/modules/motion/test_motion.cpp @@ -216,7 +216,7 @@ TEST_CASE("motion::triple_move", "[motion]") { motion.PlanMoveTo(Pulley, p, 1); // perform the move with a maximum step limit - REQUIRE(stepUntilDone(std::max({ i, s, p }) + 1) != -1); + REQUIRE(stepUntilDone(i + s + p) != -1); // check queue status REQUIRE(motion.QueueEmpty());