Purge code of all unused fields/classes. Only testing code.
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / OI.java
1 package org.usfirst.frc.team3501.robot;
2
3 import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear;
4 import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
5 import org.usfirst.frc.team3501.robot.commands.driving.ToggleFront;
6 import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntake;
7 import org.usfirst.frc.team3501.robot.commands.intakearm.StopIntake;
8 import org.usfirst.frc.team3501.robot.commands.shooter.Shoot;
9
10 import edu.wpi.first.wpilibj.Joystick;
11 import edu.wpi.first.wpilibj.buttons.Button;
12 import edu.wpi.first.wpilibj.buttons.JoystickButton;
13
14 public class OI {
15 public static Joystick leftJoystick;
16 public static Joystick rightJoystick;
17
18 // left joystick buttons
19 public static Button gearTrigger;
20
21 // right joystick buttons
22 public static Button intakeTrigger;
23 public static Button shootBoulder;
24 public static Button toggleFront;
25
26 public OI() {
27 leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
28 rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
29
30 // Left joystick
31 gearTrigger = new JoystickButton(leftJoystick,
32 Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
33 gearTrigger.whenPressed(new SetHighGear());
34 gearTrigger.whenReleased(new SetLowGear());
35
36 // Right joystick
37 intakeTrigger = new JoystickButton(rightJoystick,
38 Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
39 intakeTrigger.whenPressed(new RunIntake());
40 intakeTrigger.whenReleased(new StopIntake());
41
42 shootBoulder = new JoystickButton(rightJoystick,
43 Constants.OI.RIGHT_JOYSTICK_SHOOT_PORT);
44 shootBoulder.whenPressed(new Shoot());
45
46 toggleFront = new JoystickButton(rightJoystick,
47 Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
48 toggleFront.whenPressed(new ToggleFront());
49 }
50 }