Instead of using our ramping both to accelerate and decelerate the elevator, we use the built-in sparkmax current ramping to accelerate. We'd then use a proportional-only PID to determine the desired speed. Assuming we want to run at full speed most of the way and ramp down to .3 over the course of the last 500 ticks, the speed would be .3 + distance * K, where K is .7/500 or 0.0014.
Instead of using our ramping both to accelerate and decelerate the elevator, we use the built-in sparkmax current ramping to accelerate. We'd then use a proportional-only PID to determine the desired speed. Assuming we want to run at full speed most of the way and ramp down to .3 over the course of the last 500 ticks, the speed would be .3 + distance * K, where K is .7/500 or 0.0014.