diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-08-01 02:07:57 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-08-01 02:07:57 +0300 |
commit | bb636f973dd642b6e0b8d85c3dd10e7ec32da77c (patch) | |
tree | 4abbdaa09e99375043b0cd15fd371335961871aa /src/Movement | |
parent | f29ca7ca353cdde12813099051085716b91d6586 (diff) |
Fixed another deceleration bug
Diffstat (limited to 'src/Movement')
-rw-r--r-- | src/Movement/AxisShaper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Movement/AxisShaper.cpp b/src/Movement/AxisShaper.cpp index 8315a070..89943ab4 100644 --- a/src/Movement/AxisShaper.cpp +++ b/src/Movement/AxisShaper.cpp @@ -632,7 +632,7 @@ void AxisShaper::TryShapeDecelBoth(DDA& dda, PrepParams& params) const noexcept // If we have enough spare distance, reduce the acceleration slightly to lengthen that segment. const float newDeceleration = speedDecrease/minimumNonOverlappedOriginalClocks; const float newUnshapedDecelDistance = (dda.endSpeed + (0.5 * newDeceleration * minimumNonOverlappedOriginalClocks)) * minimumNonOverlappedOriginalClocks; - const float extraDecelDistance = GetExtraDecelStartDistance(dda.startSpeed, newDeceleration) + GetExtraDecelEndDistance(dda.topSpeed, newDeceleration); + const float extraDecelDistance = GetExtraDecelStartDistance(dda.topSpeed, newDeceleration) + GetExtraDecelEndDistance(dda.endSpeed, newDeceleration); if (ImplementDecelShaping(dda, params, dda.totalDistance - (newUnshapedDecelDistance + extraDecelDistance), minimumNonOverlappedOriginalClocks + extraClocksAtStart + extraClocksAtEnd)) { params.shapingPlan.shapeDecelStart = params.shapingPlan.shapeDecelEnd = true; |