Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance ACCELERATION_RAMPING on short moves.
Problem was: For short moves, you have to ramp down before reaching target speed. The point of return was set to half of the number of total steps. Now, what happens is there's an uneven number of steps? In integer math, 3 / 2 = 1, so the move would ramp one step up, one step down and ... well, one step even further down, resulting in a really sloooow step. Slow, like a full second or so. Adding one to the first half, the movement ramps two steps up, one down and would do another step at minimum speed, if it wasn't already at target position. This is about as accurate as we can get it without introducing more code at interrupt time.
- Loading branch information