remove unnecessary code that double checks speed input & add javadoc style comment...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / SetWinchSpeed.java
1 package org.usfirst.frc.team3501.robot.commands;
2
3 import org.usfirst.frc.team3501.robot.Robot;
4
5 import edu.wpi.first.wpilibj.command.Command;
6
7 /***
8 * This command will set the winch motor to a specified speed.
9 *
10 * pre-condition: This command must be run by a button in OI with method
11 * whileHeld()
12 *
13 * post-condition: winch motor set to a specified speed.
14 *
15 * @author Meryem and Avi
16 *
17 */
18
19 public class SetWinchSpeed extends Command {
20 double winchUpSpeed;
21
22 public SetWinchSpeed(double speed) {
23 requires(Robot.scaler);
24 winchUpSpeed = speed;
25 }
26
27 @Override
28 protected void initialize() {
29 Robot.scaler.runWinch(winchUpSpeed);
30 }
31
32 @Override
33 protected void execute() {
34 }
35
36 @Override
37 protected boolean isFinished() {
38 return true;
39 }
40
41 @Override
42 protected void end() {
43 }
44
45 @Override
46 protected void interrupted() {
47 }
48 }