1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.ToggleWinch
;
4 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleGear
;
5 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.DecreaseShootingSpeed
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.IncreaseShootingSpeed
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseIndexWheelContinuous
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
11 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
13 import edu
.wpi
.first
.wpilibj
.Joystick
;
14 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
15 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
19 public static Joystick leftJoystick
;
20 public static Joystick rightJoystick
;
21 public static Button toggleWinch
;
23 public static Button runIndexWheel
;
24 public static Button reverseIndexWheel
;
25 public static Button toggleFlyWheel
;
27 public static Button toggleGear
;
29 public static Button runIntake
;
30 public static Button reverseIntake
;
32 public static Button increaseShooterSpeed
;
33 public static Button decreaseShooterSpeed
;
35 private static Button changeCam
;
38 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
39 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
41 runIndexWheel
= new JoystickButton(rightJoystick
,
42 Constants
.OI
.RUN_INDEXWHEEL_PORT
);
43 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
45 reverseIndexWheel
= new JoystickButton(rightJoystick
,
46 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
47 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
49 toggleFlyWheel
= new JoystickButton(rightJoystick
,
50 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
51 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
53 toggleGear
= new JoystickButton(leftJoystick
,
54 Constants
.OI
.TOGGLE_GEAR_PORT
);
55 toggleGear
.whenPressed(new ToggleGear());
57 runIntake
= new JoystickButton(leftJoystick
, Constants
.OI
.RUN_INTAKE_PORT
);
58 runIntake
.whileHeld(new RunIntakeContinuous());
60 reverseIntake
= new JoystickButton(leftJoystick
,
61 Constants
.OI
.REVERSE_INTAKE_PORT
);
62 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
64 toggleWinch
= new JoystickButton(leftJoystick
,
65 Constants
.OI
.TOGGLE_WINCH_PORT
);
66 toggleWinch
.whenPressed(new ToggleWinch());
68 increaseShooterSpeed
= new JoystickButton(leftJoystick
,
69 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
70 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
72 decreaseShooterSpeed
= new JoystickButton(leftJoystick
,
73 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
74 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
76 changeCam
= new JoystickButton(rightJoystick
,
77 Constants
.OI
.CHANGE_CAMERA_VIEW
);
78 changeCam
.toggleWhenPressed(new ChangeCameraView());
81 public static OI
getOI() {