Purge code of all unused fields/classes. Only testing code.
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / OI.java
index 1c891af08f5e26dcf2b9e9bb7a3baae61b3ec938..fdb91263fd289b31569a5b0f69285aed64803b7e 100644 (file)
@@ -1,7 +1,11 @@
 package org.usfirst.frc.team3501.robot;
 
-import org.usfirst.frc.team3501.robot.commands.shooter.ChangeShooterSpeed;
-import org.usfirst.frc.team3501.robot.commands.shooter.SetShooterSpeed;
+import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear;
+import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
+import org.usfirst.frc.team3501.robot.commands.driving.ToggleFront;
+import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntake;
+import org.usfirst.frc.team3501.robot.commands.intakearm.StopIntake;
+import org.usfirst.frc.team3501.robot.commands.shooter.Shoot;
 
 import edu.wpi.first.wpilibj.Joystick;
 import edu.wpi.first.wpilibj.buttons.Button;
@@ -10,29 +14,37 @@ import edu.wpi.first.wpilibj.buttons.JoystickButton;
 public class OI {
   public static Joystick leftJoystick;
   public static Joystick rightJoystick;
-  public static Button decrementShooterSpeed;
-  public static Button incrementShooterSpeed;
-  public static Button outputCurrentShooterSpeed;
-  public static Button trigger;
+
+  // left joystick buttons
+  public static Button gearTrigger;
+
+  // right joystick buttons
+  public static Button intakeTrigger;
+  public static Button shootBoulder;
+  public static Button toggleFront;
 
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
-    decrementShooterSpeed = new JoystickButton(rightJoystick,
-        Constants.OI.DECREMENT_SHOOTER_SPEED_PORT);
-    decrementShooterSpeed.whenPressed(new ChangeShooterSpeed(-0.1));
-
-    incrementShooterSpeed = new JoystickButton(rightJoystick,
-        Constants.OI.INCREMENT_SHOOTER_SPEED_PORT);
-    incrementShooterSpeed.whenPressed(new ChangeShooterSpeed(0.1));
-
-    outputCurrentShooterSpeed = new JoystickButton(rightJoystick,
-        Constants.OI.SHOOT_PORT);
-
-    trigger = new JoystickButton(rightJoystick, Constants.OI.TRIGGER_PORT);
-    trigger.whenPressed(new SetShooterSpeed(0.5));
-    trigger.whenReleased(new SetShooterSpeed(0.0));
-
+    // Left joystick
+    gearTrigger = new JoystickButton(leftJoystick,
+        Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
+    gearTrigger.whenPressed(new SetHighGear());
+    gearTrigger.whenReleased(new SetLowGear());
+
+    // Right joystick
+    intakeTrigger = new JoystickButton(rightJoystick,
+        Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
+    intakeTrigger.whenPressed(new RunIntake());
+    intakeTrigger.whenReleased(new StopIntake());
+
+    shootBoulder = new JoystickButton(rightJoystick,
+        Constants.OI.RIGHT_JOYSTICK_SHOOT_PORT);
+    shootBoulder.whenPressed(new Shoot());
+
+    toggleFront = new JoystickButton(rightJoystick,
+        Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
+    toggleFront.whenPressed(new ToggleFront());
   }
 }