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
.driving
.ToggleGear
;
7 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.Turn90Left
;
8 import org
.usfirst
.frc
.team3501
.robot
.commands
.driving
.Turn90Right
;
9 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.ReverseIntakeContinuous
;
10 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.RunIntakeContinuous
;
11 import org
.usfirst
.frc
.team3501
.robot
.commands
.intake
.StopIntake
;
12 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.DecreaseShootingSpeed
;
13 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.IncreaseShootingSpeed
;
14 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.RunIndexWheelContinuous
;
15 import org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
.StopIndexWheel
;
17 import edu
.wpi
.first
.wpilibj
.Joystick
;
18 import edu
.wpi
.first
.wpilibj
.buttons
.Button
;
19 import edu
.wpi
.first
.wpilibj
.buttons
.JoystickButton
;
23 public static Joystick leftJoystick
;
24 public static Joystick rightJoystick
;
26 public static Button toggleWinch
;
28 public static Button toggleIndexWheel
;
29 public static Button toggleFlyWheel
;
31 public static Button toggleIntake
;
32 public static Button toggleReverseIntake
;
34 public static Button toggleGearSpeed
;
36 public static Button increaseShootSpeed
;
37 public static Button decreaseShootSpeed
;
39 public static Button turn90Right
;
40 public static Button turn90Left
;
42 public static Button readyShooter
;
43 public static Button shootButton
;
46 System
.out
.println("OI is open");
47 leftJoystick
= new Joystick(Constants
.OI
.LEFT_STICK_PORT
);
48 rightJoystick
= new Joystick(Constants
.OI
.RIGHT_STICK_PORT
);
50 shootButton
= new JoystickButton(rightJoystick
,
51 Constants
.OI
.RIGHT_TRIGGER_BUTTON
);
52 toggleWinch
= new JoystickButton(rightJoystick
,
53 Constants
.OI
.RIGHT_BUTTON_1
);
54 readyShooter
= new JoystickButton(rightJoystick
,
55 Constants
.OI
.RIGHT_BUTTON_2
);
56 increaseShootSpeed
= new JoystickButton(rightJoystick
,
57 Constants
.OI
.RIGHT_BUTTON_5
);
58 decreaseShootSpeed
= new JoystickButton(rightJoystick
,
59 Constants
.OI
.RIGHT_BUTTON_6
);
61 toggleIntake
= new JoystickButton(leftJoystick
,
62 Constants
.OI
.LEFT_TRIGGER_BUTTON
);
63 toggleGearSpeed
= new JoystickButton(leftJoystick
,
64 Constants
.OI
.LEFT_BUTTON_2
);
65 toggleIndexWheel
= new JoystickButton(leftJoystick
,
66 Constants
.OI
.LEFT_BUTTON_2
);
67 toggleFlyWheel
= new JoystickButton(leftJoystick
,
68 Constants
.OI
.LEFT_BUTTON_2
);
69 // toggleIntake = new JoystickButton(leftJoystick,
70 // Constants.OI.LEFT_BUTTON_3);
71 toggleReverseIntake
= new JoystickButton(leftJoystick
,
72 Constants
.OI
.LEFT_BUTTON_4
);
73 turn90Right
= new JoystickButton(leftJoystick
, Constants
.OI
.LEFT_BUTTON_5
);
74 turn90Left
= new JoystickButton(leftJoystick
, Constants
.OI
.LEFT_BUTTON_6
);
76 toggleWinch
.whenActive(new RunWinchContinuous(1));
77 // toggleWinch.whenReleased(new KeepWinchInPlace());
79 toggleIndexWheel
.whenPressed(new RunIndexWheelContinuous(1));
81 toggleIntake
.whenActive(new RunIntakeContinuous());
82 toggleReverseIntake
.whenActive(new ReverseIntakeContinuous());
83 toggleIntake
.whenReleased(new StopIntake());
84 toggleReverseIntake
.whenReleased(new StopIntake());
86 toggleGearSpeed
.whenPressed(new ToggleGear());
88 increaseShootSpeed
.whenPressed(new IncreaseShootingSpeed());
89 decreaseShootSpeed
.whenPressed(new DecreaseShootingSpeed());
91 turn90Right
.whenPressed(new Turn90Right());
92 turn90Left
.whenPressed(new Turn90Left());
94 readyShooter
.whenPressed(new PrepareToShoot());
95 shootButton
.whenActive(new Shoot());
96 shootButton
.whenReleased(new StopIndexWheel());
99 public static OI
getOI() {