From: Shaina Chen Date: Wed, 10 Feb 2016 03:24:30 +0000 (-0800) Subject: create and fill lowerArmContinuous command X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=2982ae9eb372c275f9804b5dcd912fce03f7af35 create and fill lowerArmContinuous command --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/LowerArmContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/LowerArmContinuous.java new file mode 100755 index 00000000..8d46ff92 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/LowerArmContinuous.java @@ -0,0 +1,39 @@ +package org.usfirst.frc.team3501.robot.commands; + +import org.usfirst.frc.team3501.robot.Robot; + +import edu.wpi.first.wpilibj.command.Command; + +public class LowerArmContinuous extends Command { + + private double speed; + + public LowerArmContinuous(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(); + } +}