Correct methods in scaler and edit runwinchcontinuous
authorKevin Zhang <icestormf1@gmail.com>
Mon, 15 Feb 2016 00:30:20 +0000 (16:30 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Mon, 15 Feb 2016 00:30:20 +0000 (16:30 -0800)
src/org/usfirst/frc/team3501/robot/commands/RunWinchContinuous.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/scaler/RunWinchContinuous.java [new file with mode: 0644]

diff --git a/src/org/usfirst/frc/team3501/robot/commands/RunWinchContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/RunWinchContinuous.java
deleted file mode 100644 (file)
index 304c983..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-/***
- * This command will run the winch motor continuously until the button
- * tirggering it is released.
- *
- * pre-condition: This command must be run by a button in OI with method
- * whileHeld(). The robot must be attached to the tower rung.
- *
- * post-condition: winch motor set to a specified speed.
- *
- * @author Lauren
- *
- */
-
-public class RunWinchContinuous extends Command {
-  private double winchUpSpeed;
-
-  public RunWinchContinuous(double speed) {
-    requires(Robot.scaler);
-    winchUpSpeed = speed;
-  }
-
-  @Override
-  protected void initialize() {
-    Robot.scaler.runWinch(winchUpSpeed);
-  }
-
-  @Override
-  protected void execute() {
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-    Robot.scaler.stopWinch();
-  }
-
-  @Override
-  protected void interrupted() {
-    end();
-  }
-}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/scaler/RunWinchContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/scaler/RunWinchContinuous.java
new file mode 100644 (file)
index 0000000..304c983
--- /dev/null
@@ -0,0 +1,51 @@
+package org.usfirst.frc.team3501.robot.commands;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+/***
+ * This command will run the winch motor continuously until the button
+ * tirggering it is released.
+ *
+ * pre-condition: This command must be run by a button in OI with method
+ * whileHeld(). The robot must be attached to the tower rung.
+ *
+ * post-condition: winch motor set to a specified speed.
+ *
+ * @author Lauren
+ *
+ */
+
+public class RunWinchContinuous extends Command {
+  private double winchUpSpeed;
+
+  public RunWinchContinuous(double speed) {
+    requires(Robot.scaler);
+    winchUpSpeed = speed;
+  }
+
+  @Override
+  protected void initialize() {
+    Robot.scaler.runWinch(winchUpSpeed);
+  }
+
+  @Override
+  protected void execute() {
+  }
+
+  @Override
+  protected boolean isFinished() {
+    return true;
+  }
+
+  @Override
+  protected void end() {
+    Robot.scaler.stopWinch();
+  }
+
+  @Override
+  protected void interrupted() {
+    end();
+  }
+}