0c30e781ca7dc6990caef9897b5aa3924f035d78
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / RaiseArmContinuous.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 public class RaiseArmContinuous extends Command {
8
9 private double speed;
10
11 public RaiseArmContinuous(double speed) {
12 requires(Robot.defenseArm);
13 this.speed = speed;
14 }
15
16 @Override
17 protected void initialize() {
18 Robot.defenseArm.setArmSpeed(speed);
19 }
20
21 @Override
22 protected void execute() {
23 }
24
25 @Override
26 protected boolean isFinished() {
27 return false;
28 // not sure if anything should be in isFinished
29 // when button is released command should go directly to end() ?
30 }
31
32 @Override
33 protected void end() {
34 Robot.defenseArm.setArmSpeed(0);
35 }
36
37 @Override
38 protected void interrupted() {
39 end();
40 }
41 }