From aef97dd85566b0f6e3b86bc37379f307064d79fa Mon Sep 17 00:00:00 2001 From: Lauren Meier Date: Mon, 8 Feb 2016 20:46:05 -0800 Subject: [PATCH] update code to understanding of command purposes --- ...otUpContinuous.java => SetWinchSpeed.java} | 4 +- .../commands/WinchRobotDownContinuous.java | 39 ------------------- 2 files changed, 2 insertions(+), 41 deletions(-) rename src/org/usfirst/frc/team3501/robot/commands/{WinchRobotUpContinuous.java => SetWinchSpeed.java} (85%) delete mode 100644 src/org/usfirst/frc/team3501/robot/commands/WinchRobotDownContinuous.java diff --git a/src/org/usfirst/frc/team3501/robot/commands/WinchRobotUpContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java similarity index 85% rename from src/org/usfirst/frc/team3501/robot/commands/WinchRobotUpContinuous.java rename to src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java index ea35f24d..ee5b9cd9 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/WinchRobotUpContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java @@ -4,10 +4,10 @@ import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; -public class WinchRobotUpContinuous extends Command { +public class SetWinchSpeed extends Command { double winchUpSpeed; - public WinchRobotUpContinuous(double speed) { + public SetWinchSpeed(double speed) { winchUpSpeed = speed; if (winchUpSpeed > 1) winchUpSpeed = 1; 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 index 69935270..00000000 --- a/src/org/usfirst/frc/team3501/robot/commands/WinchRobotDownContinuous.java +++ /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() { - } -} -- 2.30.2