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
.RunWinch
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.StopWinch
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ShiftDriveHighGear
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ShiftDriveLowGear
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ShiftGearManipulatorPistonHigh
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ShiftGearManipulatorPistonLow
;
11 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.DecreaseShootingSpeed
;
14 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.IncreaseShootingSpeed
;
15 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ResetShootingSpeed
;
16 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseFlyWheelContinuous
;
17 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseIndexWheelContinuous
;
18 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
19 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
20 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.StopFlyWheel
;
22 import edu
.wpi
.first
.wpilibj
.Joystick
;
23 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
24 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
28 public static Joystick xboxController
;
29 // public static Joystick rightJoystick;
30 public static Joystick gamePad
;
32 public static Button runIndexWheel
;
33 public static Button reverseIndexWheel
;
34 public static Button runFlyWheel
;
35 public static Button stopFlyWheel
;
36 public static Button reverseFlyWheel
;
38 // public static Button toggleGear;
39 public static Button shiftHigh
;
40 public static Button shiftLow
;
42 // public static Button toggleGearManipulatorPiston;
44 public static Button runIntake
;
45 public static Button reverseIntake
;
47 public static Button increaseShooterSpeed
;
48 public static Button decreaseShooterSpeed
;
49 public static Button resetShooterSpeed
;
51 public static Button brakeCANTalons
;
52 public static Button coastCANTalons
;
53 public static Button climb
;
54 public static Button stopclimb
;
56 public static Button shiftGearManipulatorPistonHigh
;
57 public static Button shiftGearManipulatorPistonLow
;
60 xboxController
= new Joystick(Constants
.OI
.XBOX_CONTROLLER_PORT
);
61 // rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
62 gamePad
= new Joystick(Constants
.OI
.GAME_PAD_PORT
);
64 runIndexWheel
= new JoystickButton(xboxController
,
65 Constants
.OI
.RUN_INDEXWHEEL_PORT
);
66 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
68 reverseIndexWheel
= new JoystickButton(xboxController
,
69 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
70 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
72 runFlyWheel
= new JoystickButton(gamePad
, Constants
.OI
.RUN_FLYWHEEL_PORT
);
73 runFlyWheel
.whenPressed(new RunFlyWheelContinuous());
75 stopFlyWheel
= new JoystickButton(gamePad
, Constants
.OI
.STOP_FLYWHEEL_PORT
);
76 stopFlyWheel
.whenPressed(new StopFlyWheel());
78 reverseFlyWheel
= new JoystickButton(gamePad
,
79 Constants
.OI
.REVERSE_FLYWHEEL_PORT
);
80 reverseFlyWheel
.whileHeld(new ReverseFlyWheelContinuous());
82 shiftHigh
= new JoystickButton(xboxController
,
83 Constants
.OI
.SHIFT_HIGH_PORT
);
84 shiftHigh
.whenPressed(new ShiftDriveHighGear());
86 shiftLow
= new JoystickButton(xboxController
, Constants
.OI
.SHIFT_LOW_PORT
);
87 shiftLow
.whenPressed(new ShiftDriveLowGear());
90 * toggleGearManipulatorPiston = new JoystickButton(gamePad,
91 * Constants.OI.TOGGLE_GEAR_MANIPULATOR_PORT);
92 * toggleGearManipulatorPiston.whenPressed(new
93 * ToggleGearManipulatorPiston());
96 shiftGearManipulatorPistonHigh
= new JoystickButton(gamePad
,
97 Constants
.OI
.SHIFT_GEAR_MANIPULATOR_HIGH_PORT
);
98 shiftGearManipulatorPistonHigh
99 .whenPressed(new ShiftGearManipulatorPistonHigh());
101 shiftGearManipulatorPistonLow
= new JoystickButton(gamePad
,
102 Constants
.OI
.SHIFT_GEAR_MANIPULATOR_LOW_PORT
);
103 shiftGearManipulatorPistonLow
104 .whenPressed(new ShiftGearManipulatorPistonLow());
106 runIntake
= new JoystickButton(xboxController
,
107 Constants
.OI
.RUN_INTAKE_PORT
);
108 runIntake
.whileHeld(new RunIntakeContinuous());
110 reverseIntake
= new JoystickButton(xboxController
,
111 Constants
.OI
.REVERSE_INTAKE_PORT
);
112 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
114 increaseShooterSpeed
= new JoystickButton(gamePad
,
115 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
116 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
118 decreaseShooterSpeed
= new JoystickButton(gamePad
,
119 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
120 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
122 resetShooterSpeed
= new JoystickButton(gamePad
,
123 Constants
.OI
.RESET_SHOOTER_SPEED_PORT
);
124 resetShooterSpeed
.whenPressed(new ResetShootingSpeed());
126 brakeCANTalons
= new JoystickButton(xboxController
,
127 Constants
.OI
.BRAKE_CANTALONS_PORT
);
128 brakeCANTalons
.whenPressed(new BrakeCANTalons());
130 coastCANTalons
= new JoystickButton(xboxController
,
131 Constants
.OI
.COAST_CANTALONS_PORT
);
132 coastCANTalons
.whenPressed(new CoastCANTalons());
134 climb
= new JoystickButton(xboxController
, Constants
.OI
.CLIMB_PORT
);
135 climb
.whenPressed(new RunWinch());
137 stopclimb
= new JoystickButton(xboxController
,
138 Constants
.OI
.STOP_CLIMB_PORT
);
139 stopclimb
.whenPressed(new StopWinch());
142 public static OI
getOI() {