--- /dev/null
+package org.usfirst.frc.team3501.robot.commands.defensearm;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/***
+ * This command is intended to be run from OI using button.whileHeld(...).
+ * It raises the defenseArm continually while the button is being held down.
+ *
+ * @author shaina
+ */
+public class RaiseDefenseArmContinuous extends Command {
+
+ private double speed;
+
+ public RaiseDefenseArmContinuous(double speed) {
+ requires(Robot.defenseArm);
+ this.speed = speed;
+ }
+
+ @Override
+ protected void initialize() {
+ Robot.defenseArm.setArmSpeed(speed);
+ }
+
+ @Override
+ protected void execute() {
+ }
+
+ @Override
+ protected boolean isFinished() {
+ return true;
+ }
+
+ @Override
+ protected void end() {
+ Robot.defenseArm.setArmSpeed(0);
+ }
+
+ @Override
+ protected void interrupted() {
+ end();
+ }
+}