update code to understanding of command purposes
authorLauren Meier <meier.lauren@gmail.com>
Tue, 9 Feb 2016 04:46:05 +0000 (20:46 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Mon, 15 Feb 2016 00:22:19 +0000 (16:22 -0800)
src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/WinchRobotDownContinuous.java [deleted file]
src/org/usfirst/frc/team3501/robot/commands/WinchRobotUpContinuous.java [deleted file]

diff --git a/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java
new file mode 100644 (file)
index 0000000..ee5b9cd
--- /dev/null
@@ -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 SetWinchSpeed extends Command {
+  double winchUpSpeed;
+
+  public SetWinchSpeed(double speed) {
+    winchUpSpeed = speed;
+    if (winchUpSpeed > 1)
+      winchUpSpeed = 1;
+    if (winchUpSpeed < -1)
+      winchUpSpeed = -1;
+  }
+
+  @Override
+  protected void initialize() {
+    Robot.scaler.runWinch(winchUpSpeed);
+  }
+
+  @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/WinchRobotDownContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/WinchRobotDownContinuous.java
deleted file mode 100644 (file)
index 6993527..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class WinchRobotDownContinuous extends Command {
-  double winchDownSpeed;
-
-  public WinchRobotDownContinuous(double speed) {
-    winchDownSpeed = speed;
-    if (winchDownSpeed > 1)
-      winchDownSpeed = 1;
-    if (winchDownSpeed < -1)
-      winchDownSpeed = -1;
-  }
-
-  @Override
-  protected void initialize() {
-    Robot.scaler.runWinch(winchDownSpeed);
-  }
-
-  @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/WinchRobotUpContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/WinchRobotUpContinuous.java
deleted file mode 100644 (file)
index ea35f24..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.usfirst.frc.team3501.robot.commands;
-
-import org.usfirst.frc.team3501.robot.Robot;
-
-import edu.wpi.first.wpilibj.command.Command;
-
-public class WinchRobotUpContinuous extends Command {
-  double winchUpSpeed;
-
-  public WinchRobotUpContinuous(double speed) {
-    winchUpSpeed = speed;
-    if (winchUpSpeed > 1)
-      winchUpSpeed = 1;
-    if (winchUpSpeed < -1)
-      winchUpSpeed = -1;
-  }
-
-  @Override
-  protected void initialize() {
-    Robot.scaler.runWinch(winchUpSpeed);
-  }
-
-  @Override
-  protected void execute() {
-  }
-
-  @Override
-  protected boolean isFinished() {
-    return true;
-  }
-
-  @Override
-  protected void end() {
-  }
-
-  @Override
-  protected void interrupted() {
-  }
-}