public final static int RIGHT_STICK_TRIGGER = 0;
public final static int RIGHT_STICK_LEFT_SILVER_BUTTON = 0;
public final static int RIGHT_STICK_RIGHT_SILVER_BUTTON = 0;
+ public final static int RIGHT_STICK_THUMB_BUTTON = 0;
}
public static class DriveTrain {
public static Joystick rightJoystick;
public static Button leftSilverButton;
public static Button rightSilverButton;
+ public static Button thumbButton;
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
Constants.OI.RIGHT_STICK_RIGHT_SILVER_BUTTON);
;
+ thumbButton = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_STICK_THUMB_BUTTON);
+
}
}
boolean triggerPressed = Robot.oi.rightJoystick.getTrigger();
boolean leftSidePressed = Robot.oi.leftSilverButton.get();
boolean rightSidePressed = Robot.oi.rightSilverButton.get();
+ boolean thumbPressed = Robot.oi.thumbButton.get();
double currentWheelSpeed = Robot.shooter.getCurrentSpeed();
- if (triggerPressed = true) {
+ if (triggerPressed == true) {
Robot.shooter.setSpeed(currentWheelSpeed);
} else {
Robot.shooter.setSpeed(0.0);
}
- if (leftSidePressed = true) {
+ if (leftSidePressed == true) {
Robot.shooter.setDecrementSpeed(0.1);
}
- if (rightSidePressed = true) {
+ if (rightSidePressed == true) {
Robot.shooter.setIncrementSpeed(0.1);
}
+ if (thumbPressed == true) {
+ System.out.println(Robot.shooter.getCurrentSpeed());
+ }
+
}
// Make this return true when this Command no longer needs to run execute()