edit continuous commands
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / shooter / RunIndexWheelContinuous.java
index 2a5ccbede9710e1e9ce2a3c711afb5dff2517c67..adcd1a618df4b8f614824574952871d7c75f455b 100644 (file)
@@ -1,6 +1,7 @@
 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;
 
@@ -17,7 +18,7 @@ import edu.wpi.first.wpilibj.command.Command;
  * @author Shaina
  */
 public class RunIndexWheelContinuous extends Command {
-  private double motorVal;
+  private Shooter shooter = Robot.getShooter();
 
   /**
    * See JavaDoc comment in class for details
@@ -25,19 +26,19 @@ public class RunIndexWheelContinuous extends Command {
    * @param motorVal
    *          value range from -1 to 1
    */
-  public RunIndexWheelContinuous(double motorVal) {
-    this.motorVal = motorVal;
+  public RunIndexWheelContinuous() {
+    requires(shooter);
   }
 
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
-    Robot.getShooter().setIndexWheelMotorVal(motorVal);
   }
 
   // Called repeatedly when this Command is scheduled to run
   @Override
   protected void execute() {
+    shooter.setIndexWheelMotorVal(shooter.DEFAULT_INDEXING_SPEED);
   }
 
   // Called once after isFinished returns true
@@ -55,6 +56,7 @@ public class RunIndexWheelContinuous extends Command {
   @Override
   protected boolean isFinished() {
     return false;
+
   }
 
 }