* This command runs the drive train motors (which runs the winch) continuously
* at a specified speed until the button triggering it is released
*
- * pre-condition: This command must be run by a button in OI. The robot must be
- * attached to the rope.
+ * pre-condition: This command must be run by a button in OI with
+ * button.whileHeld(...). The robot must be attached to the rope.
*
* post-condition: Drive train motors set to a specified speed.
*
*
*/
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) {
+ public RunWinchContinuous() {
requires(Robot.getDriveTrain());
- this.motorVal = motorVal;
}
@Override
protected void initialize() {
- Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
+ Robot.getDriveTrain().setMotorValues(
+ Robot.getDriveTrain().getClimbingSpeed(),
+ Robot.getDriveTrain().getClimbingSpeed());
}
@Override