public static class OI {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 1;
- public final static int RIGHT_BUTTON_2 = 0;
- public final static int RIGHT_BUTTON_3 = 0;
- public final static int RIGHT_BUTTON_4 = 0;
- public final static int RIGHT_BUTTON_5 = 0;
+ public final static int RIGHT_BUTTON_1 = 1;
+ public final static int RIGHT_BUTTON_2 = 2;
+ public final static int RIGHT_BUTTON_3 = 3;
+ public final static int RIGHT_BUTTON_4 = 4;
+ public final static int RIGHT_BUTTON_5 = 5;
+ public final static int RIGHT_BUTTON_6 = 6;
+ public final static int LEFT_BUTTON_1 = 1;
public final static int LEFT_BUTTON_2 = 2;
- public final static int LEFT_BUTTON_3 = 0;
- public final static int LEFT_BUTTON_4 = 0;
- public final static int LEFT_BUTTON_5 = 0;
- public final static int LEFT_BUTTON_6 = 0;
+ public final static int LEFT_BUTTON_3 = 3;
+ public final static int LEFT_BUTTON_4 = 4;
+ public final static int LEFT_BUTTON_5 = 5;
+ public final static int LEFT_BUTTON_6 = 6;
public final static int LEFT_TRIGGER_BUTTON = 0;
public final static int RIGHT_TRIGGER_BUTTON = 0;
+ public final static int RIGHT_LOWER_TRIGGER = 0;
}
public static class Shooter {
import org.usfirst.frc.team3501.robot.commands.shooter.DecreaseShootingSpeed;
import org.usfirst.frc.team3501.robot.commands.shooter.IncreaseShootingSpeed;
import org.usfirst.frc.team3501.robot.commands.shooter.RunIndexWheelContinuous;
+import org.usfirst.frc.team3501.robot.commands.shooter.StopIndexWheel;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
System.out.println("OI is open");
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
- toggleWinch = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_2);
+
+ shootButton = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_TRIGGER_BUTTON);
+ toggleWinch = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_BUTTON_1);
+ readyShooter = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_BUTTON_2);
+ increaseShootSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_BUTTON_5);
+ decreaseShootSpeed = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_BUTTON_6);
+
+ toggleIntake = new JoystickButton(leftJoystick,
+ Constants.OI.LEFT_TRIGGER_BUTTON);
+ toggleGearSpeed = new JoystickButton(leftJoystick,
+ Constants.OI.LEFT_BUTTON_2);
toggleIndexWheel = new JoystickButton(leftJoystick,
Constants.OI.LEFT_BUTTON_2);
toggleFlyWheel = new JoystickButton(leftJoystick,
Constants.OI.LEFT_BUTTON_2);
- toggleIntake = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_2);
+ // toggleIntake = new JoystickButton(leftJoystick,
+ // Constants.OI.LEFT_BUTTON_3);
toggleReverseIntake = new JoystickButton(leftJoystick,
- Constants.OI.LEFT_BUTTON_2);
- toggleGearSpeed = new JoystickButton(leftJoystick,
- Constants.OI.LEFT_BUTTON_2);
- increaseShootSpeed = new JoystickButton(leftJoystick,
- Constants.OI.LEFT_BUTTON_2);
- decreaseShootSpeed = new JoystickButton(leftJoystick,
- Constants.OI.LEFT_BUTTON_2);
- turn90Right = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_2);
- turn90Left = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_2);
- readyShooter = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_2);
- shootButton = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_2);
+ Constants.OI.LEFT_BUTTON_4);
+ turn90Right = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_5);
+ turn90Left = new JoystickButton(leftJoystick, Constants.OI.LEFT_BUTTON_6);
toggleWinch.whenActive(new RunWinchContinuous(1));
// toggleWinch.whenReleased(new KeepWinchInPlace());
turn90Left.whenPressed(new Turn90Left());
readyShooter.whenPressed(new PrepareToShoot());
- shootButton.whenPressed(new Shoot());
+ shootButton.whenActive(new Shoot());
+ shootButton.whenReleased(new StopIndexWheel());
}
public static OI getOI() {