From: Kevin Zhang Date: Sat, 23 Jan 2016 02:56:18 +0000 (-0800) Subject: Add set speed and change speed commands X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=9f3a7bd486b275ad4082a2356847647a8411bfc8 Add set speed and change speed commands --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/ChangeShooterSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/ChangeShooterSpeed.java new file mode 100644 index 00000000..637afc17 --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/ChangeShooterSpeed.java @@ -0,0 +1,38 @@ +package org.usfirst.frc.team3501.robot.commands; + +import org.usfirst.frc.team3501.robot.Robot; + +import edu.wpi.first.wpilibj.command.Command; + +public class ChangeShooterSpeed extends Command { + double change = 0; + + public ChangeShooterSpeed(double change) { + this.change = change; + } + + @Override + protected void initialize() { + Robot.shooter.changeSpeed(change); + } + + @Override + protected void execute() { + + } + + @Override + protected boolean isFinished() { + return true; + } + + @Override + protected void end() { + + } + + @Override + protected void interrupted() { + } + +} diff --git a/src/org/usfirst/frc/team3501/robot/commands/SetShooterSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/SetShooterSpeed.java new file mode 100644 index 00000000..98c4c97d --- /dev/null +++ b/src/org/usfirst/frc/team3501/robot/commands/SetShooterSpeed.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 SetShooterSpeed extends Command { + double speed = 0.0; + + public SetShooterSpeed(double speed) { + this.speed = speed; + } + + @Override + protected void initialize() { + Robot.shooter.setSpeed(speed); + } + + @Override + protected void execute() { + + } + + @Override + protected boolean isFinished() { + return true; + } + + @Override + protected void end() { + + } + + @Override + protected void interrupted() { + + } + +}