1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.MaintainClimbedPosition
;
4 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.RunWinchContinuous
;
5 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.ToggleWinch
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleGear
;
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
.ReverseIndexWheelContinuous
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
15 import edu
.wpi
.first
.wpilibj
.Joystick
;
16 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
17 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
21 public static Joystick leftJoystick
;
22 public static Joystick rightJoystick
;
23 public static Button toggleWinch
;
24 private boolean isClimbing
= false;
26 public static Button runIndexWheel
;
27 public static Button reverseIndexWheel
;
28 public static Button toggleFlyWheel
;
30 public static Button toggleGear
;
32 public static Button runIntake
;
33 public static Button reverseIntake
;
35 public static Button increaseShooterSpeed
;
36 public static Button decreaseShooterSpeed
;
39 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
40 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
42 runIndexWheel
= new JoystickButton(rightJoystick
,
43 Constants
.OI
.RUN_INDEXWHEEL_PORT
);
44 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
46 reverseIndexWheel
= new JoystickButton(leftJoystick
,
47 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
48 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
50 toggleFlyWheel
= new JoystickButton(rightJoystick
,
51 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
52 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
54 toggleGear
= new JoystickButton(leftJoystick
,
55 Constants
.OI
.TOGGLE_GEAR_PORT
);
57 toggleGear
.whenPressed(new ToggleGear());
59 runIntake
= new JoystickButton(leftJoystick
,
60 Constants
.OI
.RUN_INTAKE_PORT
);
61 runIntake
.whileHeld(new RunIntakeContinuous());
63 reverseIntake
= new JoystickButton(leftJoystick
,
64 Constants
.OI
.REVERSE_INTAKE_PORT
);
65 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
67 toggleWinch
= new JoystickButton(leftJoystick
,
68 Constants
.OI
.TOGGLE_WINCH_PORT
);
69 toggleWinch
.whenPressed(new ToggleWinch());
71 increaseShooterSpeed
= new JoystickButton(leftJoystick
,
72 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
73 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
75 decreaseShooterSpeed
= new JoystickButton(leftJoystick
,
76 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
77 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
80 toggleWinch
.whenPressed(new RunWinchContinuous());
83 toggleWinch
.whenPressed(new MaintainClimbedPosition());
88 public static OI
getOI() {