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.
+ *
+ * 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
*
private double motorVal;
public RunWinchContinuous(double motorVal) {
- requires(Robot.getClimber());
this.motorVal = motorVal;
}
@Override
protected void initialize() {
+ Robot.getClimber().setMotorValue(motorVal);
+
}
@Override
@Override
protected boolean isFinished() {
- return false;
+ return !Robot.getOI().toggleWinch.get();
}
@Override