Create changeSpeed command for incrementing and decrementing
authorEvanYap <evanyap.14@gmail.com>
Fri, 22 Jan 2016 02:58:37 +0000 (18:58 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:35 +0000 (19:37 -0800)
src/org/usfirst/frc/team3501/robot/commands/changeSpeed.java [new file with mode: 0644]

diff --git a/src/org/usfirst/frc/team3501/robot/commands/changeSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/changeSpeed.java
new file mode 100644 (file)
index 0000000..4928d87
--- /dev/null
@@ -0,0 +1,35 @@
+package org.usfirst.frc.team3501.robot.commands;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+public class changeSpeed extends Command {
+  double change = 0.0;
+
+  public changeSpeed(double change) {
+    this.change = change;
+  }
+
+  @Override
+  protected void initialize() {
+  }
+
+  @Override
+  protected void execute() {
+    Robot.shooter.changeSpeed(change);
+  }
+
+  @Override
+  protected boolean isFinished() {
+    return true;
+  }
+
+  @Override
+  protected void end() {
+  }
+
+  @Override
+  protected void interrupted() {
+  }
+}