Add buttons to move intake arm.
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / intakearm / RunBothIntakeMotors.java
diff --git a/src/org/usfirst/frc/team3501/robot/commands/intakearm/RunBothIntakeMotors.java b/src/org/usfirst/frc/team3501/robot/commands/intakearm/RunBothIntakeMotors.java
new file mode 100644 (file)
index 0000000..a2d4f4c
--- /dev/null
@@ -0,0 +1,26 @@
+package org.usfirst.frc.team3501.robot.commands.intakearm;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.CommandGroup;
+
+/***
+ * This command runs both intake arm motors at a given speed momentarily.
+ *
+ * @author harel, garima
+ *
+ */
+public class RunBothIntakeMotors extends CommandGroup {
+
+  /***
+   * @param motorSpeed
+   *          Speed at which to run intake arm motors. Range is [-1,1]
+   */
+  public RunBothIntakeMotors(double motorSpeed) {
+    addParallel(new RunIntakeMotor(Robot.intakeArm.getLeftIntakeArmMotor(),
+        motorSpeed));
+    addParallel(new RunIntakeMotor(Robot.intakeArm.getRightIntakeArmMotor(),
+        motorSpeed));
+  }
+
+}