From: Shaina Chen Date: Wed, 10 Feb 2016 03:11:24 +0000 (-0800) Subject: create and fill in raiseArmContinuous command X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=bcfe756d8b5cd2ebbae9a79e675bfb2c48a21763 create and fill in raiseArmContinuous command --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/RaiseArmContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/RaiseArmContinuous.java index 58ffd8aa..2ca0654c 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/RaiseArmContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/RaiseArmContinuous.java @@ -1,5 +1,39 @@ package org.usfirst.frc.team3501.robot.commands; -public class RaiseArmContinuous { +import org.usfirst.frc.team3501.robot.Robot; +import edu.wpi.first.wpilibj.command.Command; + +public class RaiseArmContinuous extends Command { + + private double speed; + + public RaiseArmContinuous(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 false; + } + + @Override + protected void end() { + Robot.defenseArm.setArmSpeed(0); + } + + @Override + protected void interrupted() { + end(); + } }