1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.BrakeCANTalons
;
4 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.CoastCANTalons
;
5 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleDriveGear
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleGearManipulatorPiston
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.DecreaseShootingSpeed
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.IncreaseShootingSpeed
;
11 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ResetShootingSpeed
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseFlyWheelContinuous
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseIndexWheelContinuous
;
14 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
15 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
17 import edu
.wpi
.first
.wpilibj
.Joystick
;
18 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
19 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
23 public static Joystick leftJoystick
;
24 public static Joystick rightJoystick
;
25 public static Joystick gamePad
;
27 public static Button runIndexWheel
;
28 public static Button reverseIndexWheel
;
29 public static Button toggleFlyWheel
;
30 public static Button reverseFlyWheel
;
32 public static Button toggleGear
;
33 public static Button toggleGearManipulatorPiston
;
35 public static Button runIntake
;
36 public static Button reverseIntake
;
38 public static Button increaseShooterSpeed
;
39 public static Button decreaseShooterSpeed
;
40 public static Button resetShooterSpeed
;
42 public static Button brakeCANTalons
;
43 public static Button coastCANTalons
;
46 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
47 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
48 gamePad
= new Joystick(Constants
.OI
.GAME_PAD_PORT
);
50 runIndexWheel
= new JoystickButton(rightJoystick
,
51 Constants
.OI
.RUN_INDEXWHEEL_PORT
);
52 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
54 reverseIndexWheel
= new JoystickButton(rightJoystick
,
55 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
56 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
58 toggleFlyWheel
= new JoystickButton(gamePad
,
59 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
60 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
62 reverseFlyWheel
= new JoystickButton(gamePad
,
63 Constants
.OI
.REVERSE_FLYWHEEL_PORT
);
64 reverseFlyWheel
.whileHeld(new ReverseFlyWheelContinuous());
66 toggleGear
= new JoystickButton(leftJoystick
,
67 Constants
.OI
.TOGGLE_GEAR_PORT
);
68 toggleGear
.whenPressed(new ToggleDriveGear());
70 toggleGearManipulatorPiston
= new JoystickButton(gamePad
,
71 Constants
.OI
.TOGGLE_GEAR_MANIPULATOR_PORT
);
72 toggleGearManipulatorPiston
.whenPressed(new ToggleGearManipulatorPiston());
74 runIntake
= new JoystickButton(leftJoystick
, Constants
.OI
.RUN_INTAKE_PORT
);
75 runIntake
.whileHeld(new RunIntakeContinuous());
77 reverseIntake
= new JoystickButton(leftJoystick
,
78 Constants
.OI
.REVERSE_INTAKE_PORT
);
79 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
81 increaseShooterSpeed
= new JoystickButton(gamePad
,
82 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
83 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
85 decreaseShooterSpeed
= new JoystickButton(gamePad
,
86 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
87 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
89 resetShooterSpeed
= new JoystickButton(gamePad
,
90 Constants
.OI
.RESET_SHOOTER_SPEED_PORT
);
91 resetShooterSpeed
.whenPressed(new ResetShootingSpeed());
93 brakeCANTalons
= new JoystickButton(rightJoystick
,
94 Constants
.OI
.BRAKE_CANTALONS_PORT
);
95 brakeCANTalons
.whenPressed(new BrakeCANTalons());
97 coastCANTalons
= new JoystickButton(rightJoystick
,
98 Constants
.OI
.COAST_CANTALONS_PORT
);
99 coastCANTalons
.whenPressed(new CoastCANTalons());
102 public static OI
getOI() {