From: Shaina Chen Date: Wed, 10 Feb 2016 03:38:48 +0000 (-0800) Subject: create and fill lowerWristContinuous command X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=4854c2706a2a2b5eb44bd67baf7da0336afe52b4 create and fill lowerWristContinuous command --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/LowerWristContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/LowerWristContinuous.java new file mode 100755 index 00000000..a0354a9c --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/LowerWristContinuous.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 LowerWristContinuous extends Command { + + private double speed; + + public LowerWristContinuous(double speed) { + requires(Robot.defenseArm); + this.speed = -speed; + } + + @Override + protected void initialize() { + Robot.defenseArm.setHandSpeed(speed); + } + + @Override + protected void execute() { + } + + @Override + protected boolean isFinished() { + return false; + } + + @Override + protected void end() { + Robot.defenseArm.setHandSpeed(0); + } + + @Override + protected void interrupted() { + end(); + } +}