add testing commands and buttons
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / OI.java
index fa7c3ec56ae5a6cb5fd334e3687d9b629e08fced..b59b6e08b14bcf3d53a76e1a25d4b2ab5aaad3f4 100644 (file)
@@ -1,9 +1,9 @@
 package org.usfirst.frc.team3501.robot;
 
+import org.usfirst.frc.team3501.robot.commands.shooter.RecordData;
 import org.usfirst.frc.team3501.robot.commands.shooter.Test1;
 import org.usfirst.frc.team3501.robot.commands.shooter.Test2;
 import org.usfirst.frc.team3501.robot.commands.shooter.Test3;
-import org.usfirst.frc.team3501.robot.commands.shooter.Test4;
 
 import edu.wpi.first.wpilibj.Joystick;
 import edu.wpi.first.wpilibj.buttons.Button;
@@ -12,10 +12,10 @@ import edu.wpi.first.wpilibj.buttons.JoystickButton;
 public class OI {
   public static Joystick leftJoystick;
   public static Joystick rightJoystick;
-  public static Button test1;
-  public static Button test2;
-  public static Button test3;
-  public static Button test4;
+  public static Button recordData;
+  public static Button shoot;
+  public static Button incrementSpeed;
+  public static Button decrementSpeed;
 
   // // first column of arcade buttons - getting past defenses
   // public static DigitalButton passPortcullis;
@@ -31,7 +31,8 @@ public class OI {
   // public static DigitalButton moveIntakeArmInsideRobot;
   //
   // // left joystick buttons
-  // public static Button toggleShooter;
+  public static Button toggleShooter;
+
   // public static Button SpinRobot180_1; // both do the same thing, just two
   // public static Button SpinRobot180_2; // different buttons
   // public static Button compactRobot_1;
@@ -48,22 +49,6 @@ public class OI {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
-    test1 = new JoystickButton(leftJoystick,
-        Constants.OI.SPIN1_PORT);
-    test1.whenPressed(new Test1());
-
-    test2 = new JoystickButton(leftJoystick,
-        Constants.OI.LEFT_JOYSTICK_TOP_CENTER_PORT);
-    test2.whenPressed(new Test2());
-
-    test3 = new JoystickButton(leftJoystick,
-        Constants.OI.SPIN2_PORT);
-    test3.whenPressed(new Test3());
-
-    test4 = new JoystickButton(leftJoystick,
-        Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT);
-    test4.whenPressed(new Test4());
-
     // passPortcullis = new DigitalButton(
     // new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT));
     // passPortcullis.whenPressed(new PassPortcullis());
@@ -102,6 +87,23 @@ public class OI {
     //
     // toggleShooter = new JoystickButton(leftJoystick,
     // Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
+
+    recordData = new JoystickButton(leftJoystick,
+        Constants.OI.SPIN1_PORT);
+    recordData.whenPressed(new RecordData());
+
+    shoot = new JoystickButton(leftJoystick,
+        Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
+    shoot.whenPressed(new Test1());
+
+    incrementSpeed = new JoystickButton(leftJoystick,
+        Constants.OI.SPIN2_PORT);
+    incrementSpeed.whenPressed(new Test2());
+
+    decrementSpeed = new JoystickButton(leftJoystick,
+        Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT);
+    decrementSpeed.whenPressed(new Test3());
+
     // SpinRobot180_1 = new JoystickButton(leftJoystick,
     // Constants.OI.SPIN1_PORT);
     // SpinRobot180_1.whenPressed(new Turn180());