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