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
;
25 public static Button runIndexWheel
;
26 public static Button reverseIndexWheel
;
27 public static Button toggleFlyWheel
;
29 public static Button toggleGear
;
31 public static Button runIntake
;
32 public static Button reverseIntake
;
34 public static Button increaseShooterSpeed
;
35 public static Button decreaseShooterSpeed
;
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(leftJoystick
,
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
);
56 toggleGear
.whenPressed(new ToggleGear());
58 runIntake
= new JoystickButton(leftJoystick
,
59 Constants
.OI
.RUN_INTAKE_PORT
);
60 runIntake
.whileHeld(new RunIntakeContinuous());
62 reverseIntake
= new JoystickButton(leftJoystick
,
63 Constants
.OI
.REVERSE_INTAKE_PORT
);
64 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
66 toggleWinch
= new JoystickButton(leftJoystick
,
67 Constants
.OI
.TOGGLE_WINCH_PORT
);
69 increaseShooterSpeed
= new JoystickButton(leftJoystick
,
70 Constants
.OI
.INCREASE_SHOOTER_SPEED_PORT
);
71 increaseShooterSpeed
.whenPressed(new IncreaseShootingSpeed());
73 decreaseShooterSpeed
= new JoystickButton(leftJoystick
,
74 Constants
.OI
.DECREASE_SHOOTER_SPEED_PORT
);
75 decreaseShooterSpeed
.whenPressed(new DecreaseShootingSpeed());
78 toggleWinch
.whenPressed(new RunWinchContinuous());
81 toggleWinch
.whenPressed(new MaintainClimbedPosition());
86 * if (!Robot.getDriveTrain().isClimbing()) { toggleWinch.whenPressed(new
87 * RunWinchContinuous()); Robot.getDriveTrain().setClimbing(true); } else {
88 * toggleWinch.whenPressed(new MaintainClimbedPosition());
89 * Robot.getDriveTrain().setClimbing(false); }
91 toggleWinch
.whenPressed(new ToggleWinch());
94 public static OI
getOI() {