add end method code to initialize method
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / intake / StopIntake.java
index 6a2cc26c9821ec478b0517b62f8b2cb4c6a80ebd..92b8b82824986acd0b25a5810716e3dc6e179fff 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot.commands.intake;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
@@ -10,12 +12,13 @@ import edu.wpi.first.wpilibj.command.Command;
  */
 public class StopIntake extends Command {
   public StopIntake() {
-
+    requires(Robot.getIntake());
   }
 
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
+    Robot.getIntake().stopIntake();
   }
 
   // Called repeatedly when this Command is scheduled to run
@@ -32,12 +35,12 @@ public class StopIntake extends Command {
   // subsystems is scheduled to run
   @Override
   protected void interrupted() {
+    end();
   }
 
   @Override
   protected boolean isFinished() {
-    // TODO Auto-generated method stub
-    return false;
+    return true;
   }
 
 }