fill in code
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / intake / ReverseIntakeContinuous.java
index bab630da953142a9e95034e66bec90d22e08b1cd..f387112ef612a0cf3327dbe5e1e3c89a018c89b7 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;
 
 /**
@@ -9,19 +11,21 @@ import edu.wpi.first.wpilibj.command.Command;
  */
 public class ReverseIntakeContinuous extends Command {
 
-  public ReverseIntakeContinuous(double timeToMove) {
-    // Use requires() here to declare subsystem dependencies
-    // eg. requires(chassis);
+  public ReverseIntakeContinuous() {
+    requires(Robot.getIntake());
   }
 
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
+    Robot.getIntake().runReverseIntake();
+
   }
 
   // Called repeatedly when this Command is scheduled to run
   @Override
   protected void execute() {
+
   }
 
   // Make this return true when this Command no longer needs to run execute()
@@ -33,11 +37,13 @@ public class ReverseIntakeContinuous extends Command {
   // Called once after isFinished returns true
   @Override
   protected void end() {
+    Robot.getIntake().stopIntake();
   }
 
   // Called when another command which requires one or more of the same
   // subsystems is scheduled to run
   @Override
   protected void interrupted() {
+    end();
   }
 }