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
.driving
.ToggleGear
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.ReverseIndexWheelContinuous
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
12 import edu
.wpi
.first
.wpilibj
.Joystick
;
13 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
14 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
18 public static Joystick leftJoystick
;
19 public static Joystick rightJoystick
;
20 public static Button toggleWinch
;
21 private boolean isClimbing
= false;
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
;
33 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
34 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
36 runIndexWheel
= new JoystickButton(leftJoystick
,
37 Constants
.OI
.TOGGLE_INDEXWHEEL_PORT
);
38 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
40 reverseIndexWheel
= new JoystickButton(leftJoystick
,
41 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
42 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
44 toggleFlyWheel
= new JoystickButton(leftJoystick
,
45 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
46 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
48 toggleGear
= new JoystickButton(leftJoystick
,
49 Constants
.OI
.TOGGLE_GEAR_PORT
);
50 toggleGear
.whenPressed(new ToggleGear());
52 runIntake
= new JoystickButton(leftJoystick
,
53 Constants
.OI
.TOGGLE_INTAKE_PORT
);
54 runIntake
.whileHeld(new RunIntakeContinuous());
56 reverseIntake
= new JoystickButton(leftJoystick
,
57 Constants
.OI
.REVERSE_INTAKE_PORT
);
58 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
60 toggleWinch
= new JoystickButton(leftJoystick
,
61 Constants
.OI
.TOGGLE_WINCH_PORT
);
63 toggleWinch
.whenPressed(new RunWinchContinuous());
66 toggleWinch
.whenPressed(new MaintainClimbedPosition());
71 public static OI
getOI() {