refactor RunIntake to be RunIntakeContinous (because its used only with joysticks
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / OI.java
index 2412a36db7000f2a96f12bdf507bcb81dc7e6e76..d63e6f8e815523d79ad0442cf28ece1154734599 100644 (file)
@@ -5,7 +5,7 @@ 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.MoveIntakeArm;
-import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntake;
+import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntakeContinuous;
 import org.usfirst.frc.team3501.robot.commands.shooter.FireCatapult;
 import org.usfirst.frc.team3501.robot.commands.shooter.ResetCatapult;
 
@@ -66,18 +66,18 @@ public class OI {
     // Right joystick
     intake = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_INTAKE_PORT);
-    intake.whenPressed(new RunIntake(IntakeArm.IN));
-    intake.whenReleased(new RunIntake(IntakeArm.STOP));
+    intake.whenPressed(new RunIntakeContinuous(IntakeArm.IN));
+    intake.whenReleased(new RunIntakeContinuous(IntakeArm.STOP));
 
     outtake1 = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_OUTTAKE_1_PORT);
-    outtake1.whenPressed(new RunIntake(IntakeArm.OUT));
-    outtake1.whenReleased(new RunIntake(IntakeArm.STOP));
+    outtake1.whenPressed(new RunIntakeContinuous(IntakeArm.OUT));
+    outtake1.whenReleased(new RunIntakeContinuous(IntakeArm.STOP));
 
     outtake2 = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_OUTTAKE_2_PORT);
-    outtake2.whenPressed(new RunIntake(IntakeArm.OUT));
-    outtake2.whenReleased(new RunIntake(IntakeArm.STOP));
+    outtake2.whenPressed(new RunIntakeContinuous(IntakeArm.OUT));
+    outtake2.whenReleased(new RunIntakeContinuous(IntakeArm.STOP));
 
     shooterUp = new JoystickButton(rightJoystick,
         Constants.OI.RIGHT_JOYSTICK_SHOOTER_UP_PORT);