1 package org
.usfirst
.frc
.team3501
.robot
.commands
.climber
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.DriveTrain
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
9 * This command runs the winch at a specified speed when the robot has completed
10 * the climb and when the button triggering it is pressed. This command also
11 * makes the drive train motors run because the winch is controlled by the drive
14 * pre-condition: This command is run by a button in OI. The robot must have
17 * post-condition: Winch motor set to a specified speed.
20 * value range is from -1 to 1
22 * @author shivanighanta
25 public class MaintainClimbedPosition
extends Command
{
28 * See JavaDoc comment in class for details
31 * time in seconds to run the winch
33 public MaintainClimbedPosition() {
34 requires(Robot
.getDriveTrain());
38 protected void initialize() {
42 protected void execute() {
43 Robot
.getDriveTrain().setMotorValues(DriveTrain
.MAINTAIN_CLIMBED_POSITION
,
44 DriveTrain
.MAINTAIN_CLIMBED_POSITION
);
49 protected boolean isFinished() {
54 protected void end() {
55 Robot
.getDriveTrain().stop();
59 protected void interrupted() {