Quote:
Originally Posted by Lesafian
Thank you, I'll fix that! As far as everything else does it look ok?
|
i guess the goal with using an axis for your sliding mechanism was to control the speed? Then you should use your joystick axis value instead of 1 and -1 (full speed)
also, your condition testing with Math.abs removes the negative sign, so your second if test will never work
This is how it could be made
Code:
// Move sliding mechanism forwards and backwards
//if your axis is not between -0.1 and 0.1
if (Math.abs(xboxController.getRawAxis(5)) > .1) {
//set your motor output to the axis value
slideMotor.set(xboxController.getRawAxis(5));
}else {
slideMotor.set(0);
}