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
.climber
.ToggleWinch
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleDriveGear
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleGearManipulatorPiston
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.DecreaseShootingSpeed
;
11 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.IncreaseShootingSpeed
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ResetShootingSpeed
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseFlyWheelContinuous
;
14 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseIndexWheelContinuous
;
15 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
16 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
18 import edu
.wpi
.first
.wpilibj
.Joystick
;
19 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
20 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
24 public static Joystick leftJoystick
;
25 public static Joystick rightJoystick
;
26 public static Joystick gamePad
;
28 public static Button runIndexWheel
;
29 public static Button reverseIndexWheel
;
30 public static Button toggleFlyWheel
;
31 public static Button reverseFlyWheel
;
33 public static Button toggleGear
;
34 public static Button toggleGearManipulatorPiston
;
36 public static Button runIntake
;
37 public static Button reverseIntake
;
39 public static Button increaseShooterSpeed
;
40 public static Button decreaseShooterSpeed
;
41 public static Button resetShooterSpeed
;
43 public static Button brakeCANTalons
;
44 public static Button coastCANTalons
;
45 public static Button climb
;
48 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
49 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
50 gamePad
= new Joystick(Constants
.OI
.GAME_PAD_PORT
);
52 runIndexWheel
= new JoystickButton(rightJoystick
,
53 Constants
.OI
.RUN_INDEXWHEEL_PORT
);
54 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
56 reverseIndexWheel
= new JoystickButton(rightJoystick
,
57 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
58 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
60 toggleFlyWheel
= new JoystickButton(gamePad
,
61 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
62 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
64 reverseFlyWheel
= new JoystickButton(gamePad
,
65 Constants
.OI
.REVERSE_FLYWHEEL_PORT
);
66 reverseFlyWheel
.whileHeld(new ReverseFlyWheelContinuous());
68 toggleGear
= new JoystickButton(leftJoystick
,
69 Constants
.OI
.TOGGLE_GEAR_PORT
);
70 toggleGear
.whenPressed(new ToggleDriveGear());
72 toggleGearManipulatorPiston
= new JoystickButton(gamePad
,
73 Constants
.OI
.TOGGLE_GEAR_MANIPULATOR_PORT
);
74 toggleGearManipulatorPiston
.whenPressed(new ToggleGearManipulatorPiston());
76 runIntake
= new JoystickButton(leftJoystick
, Constants
.OI
.RUN_INTAKE_PORT
);
77 runIntake
.whileHeld(new RunIntakeContinuous());
79 reverseIntake
= new JoystickButton(leftJoystick
,
80 Constants
.OI
.REVERSE_INTAKE_PORT
);
81 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
83 increaseShooterSpeed
= new JoystickButton(gamePad
,
84 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
85 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
87 decreaseShooterSpeed
= new JoystickButton(gamePad
,
88 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
89 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
91 resetShooterSpeed
= new JoystickButton(gamePad
,
92 Constants
.OI
.RESET_SHOOTER_SPEED_PORT
);
93 resetShooterSpeed
.whenPressed(new ResetShootingSpeed());
95 brakeCANTalons
= new JoystickButton(rightJoystick
,
96 Constants
.OI
.BRAKE_CANTALONS_PORT
);
97 brakeCANTalons
.whenPressed(new BrakeCANTalons());
99 coastCANTalons
= new JoystickButton(rightJoystick
,
100 Constants
.OI
.COAST_CANTALONS_PORT
);
101 coastCANTalons
.whenPressed(new CoastCANTalons());
103 climb
= new JoystickButton(leftJoystick
, Constants
.OI
.CLIMB_PORT
);
104 climb
.whenPressed(new ToggleWinch());
107 public static OI
getOI() {