At the beginning of OperatorControl, you check the limit switch, and stop slidemotor if it the switch is true.
So, make sure the limit switch returns 1 (true) when it is reached, and 0 (false) when it is not.
However, you code continues to execute, and at:
Quote:
if (Math.abs(xboxController.getRawAxis(5)) > .1) {
slideMotor.set(-xboxController.getRawAxis(5));
} else {
|
you set the speed of the motor, without regard to the limit switch.