competition fixes
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / shooter / StopFlyWheel.java
index ac7ea5cb49112496d93b550b870069fda89d6c0a..0d1bbe83cf212d0022ccba2f3a54091351b1b85e 100644 (file)
@@ -1,17 +1,25 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
+import org.usfirst.frc.team3501.robot.Robot;
+import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
  * This command stops the fly wheel. Do not call unless the trigger button has
  * been released.
  *
- * 
+ *
  * @author Shaina
  */
 public class StopFlyWheel extends Command {
-  public StopFlyWheel() {
+  private Shooter shooter = Robot.getShooter();
 
+  /**
+   * This command stops the fly wheel.
+   */
+  public StopFlyWheel() {
+    requires(shooter);
   }
 
   // Called just before this Command runs the first time
@@ -27,18 +35,19 @@ public class StopFlyWheel extends Command {
   // Called once after isFinished returns true
   @Override
   protected void end() {
+    Robot.getShooter().stopFlyWheel();
   }
 
   // Called when another command which requires one or more of the same
   // subsystems is scheduled to run
   @Override
   protected void interrupted() {
+    end();
   }
 
   @Override
   protected boolean isFinished() {
-    // TODO Auto-generated method stub
-    return false;
+    return true;
   }
 
 }