Implement stopFlyWheel and stopIndexWheel
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / shooter / RunFlyWheelContinuous.java
index 20a4d08f37cf6c608a911acc9c722d597b42a759..8a6e5be4f9e3f1571afd4debb4c431198416fa73 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
@@ -9,13 +11,17 @@ import edu.wpi.first.wpilibj.command.Command;
  * pre-condition: This command must be run by a button in OI, with
  * button.whileHeld(...).
  *
- * @param motorVal
- *          value range from -1 to 1
  * @author Shaina
  */
 public class RunFlyWheelContinuous extends Command {
   private double motorVal;
 
+  /**
+   * See JavaDoc comment in class for details
+   *
+   * @param motorVal
+   *          value range from -1 to 1
+   */
   public RunFlyWheelContinuous(double motorVal) {
     this.motorVal = motorVal;
   }
@@ -23,6 +29,7 @@ public class RunFlyWheelContinuous extends Command {
   // 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
@@ -33,6 +40,7 @@ public class RunFlyWheelContinuous 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
@@ -44,7 +52,9 @@ public class RunFlyWheelContinuous extends Command {
 
   @Override
   protected boolean isFinished() {
+    // TODO
     return false;
+
   }
 
 }