import edu.wpi.first.wpilibj.command.Command;
/**
- * This command runs the winch at a specified speed and time in seconds when the
- * robot has completed the climb and when the button triggering it is pressed.
- * This command also makes the drive train motors run because the winch is
- * controlled by the drive train.
+ * This command runs the winch at a specified speed when the robot has completed
+ * the climb and when the button triggering it is pressed. This command also
+ * makes the drive train motors run because the winch is controlled by the drive
+ * train.
*
* pre-condition: This command is run by a button in OI. The robot must have
* completed climbing.
*
- * post-condition: Winch motor set to a specified speed for a specified time.
+ * post-condition: Winch motor set to a specified speed.
*
* @param motorVal
* value range is from -1 to 1
- * @param time
- * in seconds
+ *
* @author shivanighanta
*
*/
public class MaintainClimbedPosition extends Command {
- private double time;
/**
* See JavaDoc comment in class for details
* @param time
* time in seconds to run the winch
*/
- public MaintainClimbedPosition(double time) {
+ public MaintainClimbedPosition() {
requires(Robot.getDriveTrain());
- this.time = time;
}
@Override
@Override
protected boolean isFinished() {
- return timeSinceInitialized() >= time;
+ return false;
}
@Override
* @param time
* time in seconds to run the winch
* @param motorVal
- * value range is frosm -1 to 1
+ * value range is from -1 to 1
*/
public RunWinch(double time, double motorVal) {
requires(Robot.getDriveTrain());