Add everything all commands to specific packages
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / defensearm / RaiseDefenseArmContinuous.java
1 package org.usfirst.frc.team3501.robot.commands.defensearm;
2
3 import org.usfirst.frc.team3501.robot.Robot;
4
5 import edu.wpi.first.wpilibj.command.Command;
6
7 /***
8 * This command is intended to be run from OI using button.whileHeld(...).
9 * It raises the defenseArm continually while the button is being held down.
10 *
11 * @author shaina
12 */
13 public class RaiseDefenseArmContinuous extends Command {
14
15 private double speed;
16
17 public RaiseDefenseArmContinuous(double speed) {
18 requires(Robot.defenseArm);
19 this.speed = speed;
20 }
21
22 @Override
23 protected void initialize() {
24 Robot.defenseArm.setArmSpeed(speed);
25 }
26
27 @Override
28 protected void execute() {
29 }
30
31 @Override
32 protected boolean isFinished() {
33 return true;
34 }
35
36 @Override
37 protected void end() {
38 Robot.defenseArm.setArmSpeed(0);
39 }
40
41 @Override
42 protected void interrupted() {
43 end();
44 }
45 }