Delete StopWinch and Climber subsystem, edit javadoc comments
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / climber / RunWinchContinuous.java
index dc29866a2e4892cd6ba49491e1afcd81fdd3de9d..6b8209bd40e835ff68bd3c243dfcd4a4dbd49de2 100644 (file)
@@ -5,7 +5,16 @@ import org.usfirst.frc.team3501.robot.Robot;
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
- * Runs the winch continuously at a given motor value
+ * This command will run the winch motor continuously until the button
+ * triggering it is released. This command also runs the drive train.
+ *
+ * pre-condition: This command must be run by a button in OI. The robot must be
+ * attached to the rope.
+ *
+ * post-condition: Winch motor set to a specified speed.
+ *
+ * @param motorVal
+ *          value range is from -1 to 1
  *
  * @author shivanighanta
  *
@@ -13,13 +22,20 @@ import edu.wpi.first.wpilibj.command.Command;
 public class RunWinchContinuous extends Command {
   private double motorVal;
 
+  /**
+   * See JavaDoc comment in class for details
+   *
+   * @param motorVal
+   *          value range is from -1 to 1
+   */
   public RunWinchContinuous(double motorVal) {
+    requires(Robot.getDriveTrain());
     this.motorVal = motorVal;
   }
 
   @Override
   protected void initialize() {
-    Robot.getClimber().setMotorValue(motorVal);
+    Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
 
   }
 
@@ -35,7 +51,7 @@ public class RunWinchContinuous extends Command {
 
   @Override
   protected void end() {
-    Robot.getClimber().stop();
+
   }
 
   @Override