Update ports to competition setup, minor bugfixes
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / RunIntake.java
index eec3b20ad12e38a2b6fcb3d8342d4a5518d9cf44..42ed83fc3f38b5a0c0970f52aa1103fe6c0af63a 100644 (file)
@@ -1,18 +1,24 @@
 package org.usfirst.frc.team3501.robot.commands.intakearm;
 
+import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.Command;
 
 public class RunIntake extends Command {
+  int direction;
 
-  public RunIntake() {
+  public RunIntake(int direction) {
     requires(Robot.intakeArm);
+    this.direction = direction;
   }
 
   @Override
   protected void initialize() {
-    Robot.intakeArm.intakeBall();
+    if (direction == Constants.IntakeArm.IN)
+      Robot.intakeArm.intakeBall();
+    else
+      Robot.intakeArm.outputBall();
   }
 
   @Override