From 37ff9b8a8ff41dd447567b4e9ffa75609a8bc5e2 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Tue, 7 Sep 2021 14:59:55 +0200 Subject: [PATCH] Fix unit tests for AbortPlannedMoves(axis) --- tests/unit/logic/stubs/stub_motion.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/logic/stubs/stub_motion.cpp b/tests/unit/logic/stubs/stub_motion.cpp index 8fae076..aa7b684 100644 --- a/tests/unit/logic/stubs/stub_motion.cpp +++ b/tests/unit/logic/stubs/stub_motion.cpp @@ -71,10 +71,14 @@ bool Motion::QueueEmpty(Axis axis) const { void Motion::AbortPlannedMoves(bool halt) { for (uint8_t i = 0; i < 3; ++i) { - axes[i].targetPos = axes[i].pos; // leave the axis where it was at the time of abort + AbortPlannedMoves((config::Axis)i, halt); // leave the axis where it was at the time of abort } } +void Motion::AbortPlannedMoves(config::Axis i, bool) { + axes[i].targetPos = axes[i].pos; // leave the axis where it was at the time of abort +} + void ReinitMotion() { // reset the simulation data to defaults axes[0] = AxisSim({ 0, 0, false, false, false }); // pulley