edit continuous commands
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / shooter / RunFlyWheelContinuous.java
index ce77450e5fba276f5472035ad906f43166852692..1f1d5cd9d1f25a28dcd34e3be33684a583e16ec8 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 RunFlyWheelContinuous extends Command {
-  private double motorVal;
+  private Shooter shooter = Robot.getShooter();
 
   /**
    * See JavaDoc comment in class for details
@@ -25,19 +26,19 @@ public class RunFlyWheelContinuous extends Command {
    * @param motorVal
    *          value range from -1 to 1
    */
-  public RunFlyWheelContinuous(double motorVal) {
-    this.motorVal = motorVal;
+  public RunFlyWheelContinuous() {
+    requires(shooter);
   }
 
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
-    Robot.getShooter().setFlyWheelMotorVal(motorVal);
   }
 
   // Called repeatedly when this Command is scheduled to run
   @Override
   protected void execute() {
+    shooter.setFlyWheelMotorVal(shooter.CURRENT_SHOOTING_SPEED);
   }
 
   // Called once after isFinished returns true
@@ -54,12 +55,7 @@ public class RunFlyWheelContinuous extends Command {
 
   @Override
   protected boolean isFinished() {
-<<<<<<< 7fe535d58b388a1d87b3728095d8a38786865468
     return false;
-=======
-    // TODO
-    return !Robot.getOI().toggleFlyWheel.get();
->>>>>>> Add buttons to OI class
   }
 
 }