When you release the lift joystick, the commands stops changing but the lift keeps trying to catch up with it. Additionally, when the lift is on the way to a preset and the driver moves the joystick, it should abort the preset move and control from the current position.
Solution:
Keep track of the previous joystick value.
Make a state flag for liftGoingToPreset, and set it true in liftToPreset and liftToValue.
When the joystick changes from positive to (zero or negative), OR from negative to (zero or positive), call stopExtension.
When the joystick is not zero, if liftGoingToPreset is true, make it false and call stopExtension.
After those checks are complete, regardless of the outcome, if joystick is not 0, call controlExtension.
When you release the lift joystick, the commands stops changing but the lift keeps trying to catch up with it. Additionally, when the lift is on the way to a preset and the driver moves the joystick, it should abort the preset move and control from the current position.
Solution: