1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commandgroups
.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
.ReverseIndexWheelContinuous
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunFlyWheelContinuous
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
11 import edu
.wpi
.first
.wpilibj
.Joystick
;
12 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
13 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
17 public static Joystick leftJoystick
;
18 public static Joystick rightJoystick
;
19 public static Button toggleWinch
;
21 public static Button runIndexWheel
;
22 public static Button reverseIndexWheel
;
23 public static Button toggleFlyWheel
;
25 public static Button toggleGear
;
27 public static Button runIntake
;
28 public static Button reverseIntake
;
31 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
32 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
34 runIndexWheel
= new JoystickButton(leftJoystick
,
35 Constants
.OI
.TOGGLE_INDEXWHEEL_PORT
);
36 runIndexWheel
.whileHeld(new RunIndexWheelContinuous());
38 reverseIndexWheel
= new JoystickButton(leftJoystick
,
39 Constants
.OI
.REVERSE_INDEXWHEEL_PORT
);
40 reverseIndexWheel
.whileHeld(new ReverseIndexWheelContinuous());
42 toggleFlyWheel
= new JoystickButton(leftJoystick
,
43 Constants
.OI
.TOGGLE_FLYWHEEL_PORT
);
44 toggleFlyWheel
.toggleWhenPressed(new RunFlyWheelContinuous());
46 toggleGear
= new JoystickButton(leftJoystick
,
47 Constants
.OI
.TOGGLE_GEAR_PORT
);
48 toggleGear
.whenPressed(new ToggleGear());
50 runIntake
= new JoystickButton(leftJoystick
,
51 Constants
.OI
.TOGGLE_INTAKE_PORT
);
52 runIntake
.whileHeld(new RunIntakeContinuous());
54 reverseIntake
= new JoystickButton(leftJoystick
,
55 Constants
.OI
.REVERSE_INTAKE_PORT
);
56 reverseIntake
.whileHeld(new ReverseIntakeContinuous());
58 toggleWinch
= new JoystickButton(leftJoystick
,
59 Constants
.OI
.TOGGLE_WINCH_PORT
);
61 * if (!Robot.getDriveTrain().isClimbing()) { toggleWinch.whenPressed(new
62 * RunWinchContinuous()); Robot.getDriveTrain().setClimbing(true); } else {
63 * toggleWinch.whenPressed(new MaintainClimbedPosition());
64 * Robot.getDriveTrain().setClimbing(false); }
66 toggleWinch
.whenPressed(new ToggleWinch());
69 public static OI
getOI() {