make extend and retract intake arm piston methods and a command
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / MoveIntakeArm.java
diff --git a/src/org/usfirst/frc/team3501/robot/commands/intakearm/MoveIntakeArm.java b/src/org/usfirst/frc/team3501/robot/commands/intakearm/MoveIntakeArm.java
new file mode 100755 (executable)
index 0000000..1d24648
--- /dev/null
@@ -0,0 +1,43 @@
+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.DoubleSolenoid.Value;
+import edu.wpi.first.wpilibj.command.Command;
+
+/**
+ * This command will expand or retract the intake arm's pistons depending on the
+ * specified direction the intake arm should move
+ */
+public class MoveIntakeArm extends Command {
+
+  public MoveIntakeArm(Value direction) {
+
+    if (direction == Constants.IntakeArm.EXTEND)
+      Robot.intakeArm.extendPistons();
+    else
+      Robot.intakeArm.retractPistons();
+  }
+
+  @Override
+  protected void initialize() {
+  }
+
+  @Override
+  protected void execute() {
+  }
+
+  @Override
+  protected boolean isFinished() {
+    return false;
+  }
+
+  @Override
+  protected void end() {
+  }
+
+  @Override
+  protected void interrupted() {
+  }
+}