Add to ToggleBallRollerIntake command
authorniyatisriram <niyatisriram@gmail.com>
Wed, 10 Feb 2016 03:04:38 +0000 (19:04 -0800)
committerLauren Meier <meier.lauren@gmail.com>
Sat, 13 Feb 2016 22:38:59 +0000 (14:38 -0800)
src/org/usfirst/frc/team3501/robot/commands/ToggleBallRollerIntake.java

index d75814862ee78862308f8f4772069ae435e2ff55..4ae8f5f55ed88ba76720b52b1ce915423ea03509 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot.commands;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 public class ToggleBallRollerIntake extends Command {
@@ -10,6 +12,10 @@ public class ToggleBallRollerIntake extends Command {
 
   @Override
   protected void initialize() {
+    if (areRollersRolling()) {
+      Robot.intakeArm.stopRollers();
+    } else
+      Robot.intakeArm.intakeBall();
   }
 
   @Override