update code to understanding of command purposes
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / SetWinchSpeed.java
CommitLineData
0d4d5dcb
LM
1package org.usfirst.frc.team3501.robot.commands;
2
3import org.usfirst.frc.team3501.robot.Robot;
4
5import edu.wpi.first.wpilibj.command.Command;
6
aef97dd8 7public class SetWinchSpeed extends Command {
0d4d5dcb
LM
8 double winchUpSpeed;
9
aef97dd8 10 public SetWinchSpeed(double speed) {
0d4d5dcb
LM
11 winchUpSpeed = speed;
12 if (winchUpSpeed > 1)
13 winchUpSpeed = 1;
14 if (winchUpSpeed < -1)
15 winchUpSpeed = -1;
16 }
17
18 @Override
19 protected void initialize() {
20 Robot.scaler.runWinch(winchUpSpeed);
21 }
22
23 @Override
24 protected void execute() {
25 }
26
27 @Override
28 protected boolean isFinished() {
29 return true;
30 }
31
32 @Override
33 protected void end() {
34 }
35
36 @Override
37 protected void interrupted() {
38 }
39}