e20121024a0528b7d3a8c0637f96bc154f4a39a2
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.climber
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 * This command runs the drive train motors (which runs the winch) continuously
9 * at a specified speed until the button triggering it is released
11 * pre-condition: This command must be run by a button in OI with
12 * button.whileHeld(...). The robot must be attached to the rope.
14 * post-condition: Drive train motors set to a specified speed.
16 * @author shivanighanta
19 public class RunWinchContinuous
extends Command
{
20 private double motorVal
;
23 * See JavaDoc comment in class for details
26 * value range is from -1 to 1
28 public RunWinchContinuous(double motorVal
) {
29 requires(Robot
.getDriveTrain());
30 this.motorVal
= motorVal
;
34 protected void initialize() {
35 Robot
.getDriveTrain().setMotorValues(motorVal
, motorVal
);
39 protected void execute() {
44 protected boolean isFinished() {
49 protected void end() {
54 protected void interrupted() {