1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.BrakeCANTalons
;
4 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.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
.ReverseFlyWheelContinuous
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseIndexWheelContinuous
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
14 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
16 import edu
.wpi
.first
.wpilibj
.Joystick
;
17 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
18 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
22 public static Joystick leftJoystick
;
23 public static Joystick rightJoystick
;
24 public static Joystick gamePad
;
26 public static Button runIndexWheel
;
27 public static Button reverseIndexWheel
;
28 public static Button toggleFlyWheel
;
29 public static Button reverseFlyWheel
;
31 public static Button toggleGear
;
32 public static Button toggleGearManipulatorPiston
;
34 public static Button runIntake
;
35 public static Button reverseIntake
;
37 public static Button increaseShooterSpeed
;
38 public static Button decreaseShooterSpeed
;
40 public static Button brakeCANTalons
;
41 public static Button coastCANTalons
;
44 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
45 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
46 gamePad
= new Joystick(Constants
.OI
.GAME_PAD_PORT
);
48 runIndexWheel
= new JoystickButton(rightJoystick
,
49 Constants
.OI
.RUN_INDEXWHEEL_PORT
);
50 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
52 reverseIndexWheel
= new JoystickButton(rightJoystick
,
53 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
54 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
56 toggleFlyWheel
= new JoystickButton(gamePad
,
57 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
58 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
60 reverseFlyWheel
= new JoystickButton(gamePad
,
61 Constants
.OI
.REVERSE_FLYWHEEL_PORT
);
62 reverseFlyWheel
.whileHeld(new ReverseFlyWheelContinuous());
64 toggleGear
= new JoystickButton(leftJoystick
,
65 Constants
.OI
.TOGGLE_GEAR_PORT
);
66 toggleGear
.whenPressed(new ToggleDriveGear());
68 toggleGearManipulatorPiston
= new JoystickButton(gamePad
,
69 Constants
.OI
.TOGGLE_GEAR_MANIPULATOR_PORT
);
70 toggleGearManipulatorPiston
.whenPressed(new ToggleGearManipulatorPiston());
72 runIntake
= new JoystickButton(leftJoystick
, Constants
.OI
.RUN_INTAKE_PORT
);
73 runIntake
.whileHeld(new RunIntakeContinuous());
75 reverseIntake
= new JoystickButton(leftJoystick
,
76 Constants
.OI
.REVERSE_INTAKE_PORT
);
77 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
79 increaseShooterSpeed
= new JoystickButton(gamePad
,
80 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
81 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
83 decreaseShooterSpeed
= new JoystickButton(gamePad
,
84 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
85 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
87 brakeCANTalons
= new JoystickButton(rightJoystick
,
88 Constants
.OI
.BRAKE_CANTALONS_PORT
);
89 brakeCANTalons
.whenPressed(new BrakeCANTalons());
91 coastCANTalons
= new JoystickButton(rightJoystick
,
92 Constants
.OI
.COAST_CANTALONS_PORT
);
93 coastCANTalons
.whenPressed(new CoastCANTalons());
96 public static OI
getOI() {