1 package org
.usfirst
.frc
.team3501
.robot
;
3 import org
.usfirst
.frc
.team3501
.robot
.commandgroups
.PrepareToShoot
;
4 import org
.usfirst
.frc
.team3501
.robot
.commandgroups
.Shoot
;
5 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.RunWinchContinuous
;
6 import org
.usfirst
.frc
.team3501
.robot
.commands
.climber
.StopWinch
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.ToggleGear
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.Turn90Left
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.Turn90Right
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
11 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.StopIntake
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.DecreaseShootingSpeed
;
14 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.IncreaseShootingSpeed
;
15 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
16 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.StopIndexWheel
;
18 import edu
.wpi
.first
.wpilibj
.Joystick
;
19 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
20 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
24 public static Joystick leftJoystick
;
25 public static Joystick rightJoystick
;
27 public static Button toggleWinch
;
29 public static Button toggleIndexWheel
;
30 public static Button toggleFlyWheel
;
32 public static Button toggleIntake
;
33 public static Button toggleReverseIntake
;
35 public static Button toggleGearSpeed
;
37 public static Button increaseShootSpeed
;
38 public static Button decreaseShootSpeed
;
40 public static Button turn90Right
;
41 public static Button turn90Left
;
43 public static Button readyShooter
;
44 public static Button shootButton
;
47 System
.out
.println("OI is open");
48 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
49 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
51 shootButton
= new JoystickButton(rightJoystick
,
52 Constants
.OI
.RIGHT_TRIGGER_BUTTON
);
53 toggleWinch
= new JoystickButton(rightJoystick
,
54 Constants
.OI
.RIGHT_BUTTON_1
);
55 readyShooter
= new JoystickButton(rightJoystick
,
56 Constants
.OI
.RIGHT_BUTTON_2
);
57 increaseShootSpeed
= new JoystickButton(rightJoystick
,
58 Constants
.OI
.RIGHT_BUTTON_5
);
59 decreaseShootSpeed
= new JoystickButton(rightJoystick
,
60 Constants
.OI
.RIGHT_BUTTON_6
);
62 toggleIntake
= new JoystickButton(leftJoystick
,
63 Constants
.OI
.LEFT_TRIGGER_BUTTON
);
64 toggleGearSpeed
= new JoystickButton(leftJoystick
,
65 Constants
.OI
.LEFT_BUTTON_2
);
66 toggleIndexWheel
= new JoystickButton(leftJoystick
,
67 Constants
.OI
.LEFT_BUTTON_2
);
68 toggleFlyWheel
= new JoystickButton(leftJoystick
,
69 Constants
.OI
.LEFT_BUTTON_2
);
70 // toggleIntake = new JoystickButton(leftJoystick,
71 // Constants.OI.LEFT_BUTTON_3);
72 toggleReverseIntake
= new JoystickButton(leftJoystick
,
73 Constants
.OI
.LEFT_BUTTON_4
);
74 turn90Right
= new JoystickButton(leftJoystick
, Constants
.OI
.LEFT_BUTTON_5
);
75 turn90Left
= new JoystickButton(leftJoystick
, Constants
.OI
.LEFT_BUTTON_6
);
77 toggleWinch
.whenActive(new RunWinchContinuous(1));
78 toggleWinch
.whenReleased(new StopWinch());
80 toggleIndexWheel
.whenPressed(new RunIndexWheelContinuous(1));
82 toggleIntake
.whenActive(new RunIntakeContinuous());
83 toggleReverseIntake
.whenActive(new ReverseIntakeContinuous());
84 toggleIntake
.whenReleased(new StopIntake());
85 toggleReverseIntake
.whenReleased(new StopIntake());
87 toggleGearSpeed
.whenPressed(new ToggleGear());
89 increaseShootSpeed
.whenPressed(new IncreaseShootingSpeed());
90 decreaseShootSpeed
.whenPressed(new DecreaseShootingSpeed());
92 turn90Right
.whenPressed(new Turn90Right());
93 turn90Left
.whenPressed(new Turn90Left());
95 readyShooter
.whenPressed(new PrepareToShoot());
96 shootButton
.whenActive(new Shoot());
97 shootButton
.whenReleased(new StopIndexWheel());
100 public static OI
getOI() {