From 61e02eee6358440ddbb7c2e9bcfdcd5aa66e6af8 Mon Sep 17 00:00:00 2001 From: Shaina Chen Date: Tue, 9 Feb 2016 19:36:26 -0800 Subject: [PATCH] create and fill raiseWristContinuous command --- .../robot/commands/RaiseWristContinuous.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 src/org/usfirst/frc/team3501/robot/commands/RaiseWristContinuous.java diff --git a/src/org/usfirst/frc/team3501/robot/commands/RaiseWristContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/RaiseWristContinuous.java new file mode 100755 index 00000000..1270c8e9 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/RaiseWristContinuous.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 RaiseWristContinuous extends Command { + + private double speed; + + public RaiseWristContinuous(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(); + } +} -- 2.30.2