Quote:
Originally Posted by wickzam
We tried to use getRawButton in our code but every time we use it there is a problem.
|
What kind of problem?
Here is an example of using getRawButton to switch between tank drive and arcade drive when the trigger (button one) on the left joystick is pressed.
Code:
public void operatorControl() {
chassis.setSafetyEnabled(true);
if (leftStick.getRawButton(1))
{
chassis.tankDrive(leftStick, rightStick);
Timer.delay(0.01);
}
else
{
chassis.arcadeDrive(leftStick);
}
}
Also, in your original code, your autonomous code won't run because autonomous is misspelled.