From 475e2207fd06912de8fc280c4f72e88a57bfbb88 Mon Sep 17 00:00:00 2001 From: AndyZe Date: Sun, 28 Jun 2020 09:20:20 -0500 Subject: [PATCH] Simple fix to backwardLimitComp if/else --- src/single_joint_generator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/single_joint_generator.cpp b/src/single_joint_generator.cpp index 4be76d52..85ce0af9 100644 --- a/src/single_joint_generator.cpp +++ b/src/single_joint_generator.cpp @@ -333,9 +333,9 @@ bool SingleJointGenerator::backwardLimitCompensation(size_t limited_index, doubl break; } } - // else, can't make all of the correction in this timestep, so make as - // much of a change as possible - else + + // Can't make all of the correction in this timestep, so make as much of a change as possible + if (!successful_compensation) { // This is what accel and jerk would be if we set velocity(index) to the // limit