X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fclimber%2FToggleWinch.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fclimber%2FToggleWinch.java;h=0000000000000000000000000000000000000000;hp=3e60406cc66e332167c465d59dae56d08311b13f;hb=150f450f2b4f9e6094d71007507a7b877e05328a;hpb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/ToggleWinch.java b/src/org/usfirst/frc/team3501/robot/commands/climber/ToggleWinch.java deleted file mode 100644 index 3e60406..0000000 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/ToggleWinch.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands.climber; - -import org.usfirst.frc.team3501.robot.Robot; -import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; - -import edu.wpi.first.wpilibj.command.Command; - -/** - * - */ -public class ToggleWinch extends Command { - DriveTrain driveTrain = Robot.getDriveTrain(); - private double climbingSpeed; - private double maintainPositionSpeed; - - public ToggleWinch() { - requires(driveTrain); - climbingSpeed = driveTrain.CLIMBER_SPEED; - maintainPositionSpeed = driveTrain.MAINTAIN_CLIMBED_POSITION; - } - - @Override - protected void initialize() { - } - - @Override - protected void execute() { - if (driveTrain.shouldBeClimbing) { - driveTrain.setMotorValues(climbingSpeed, climbingSpeed); - } else { - driveTrain.setMotorValues(maintainPositionSpeed, maintainPositionSpeed); - } - } - - @Override - protected boolean isFinished() { - return false; - } - - @Override - protected void end() { - driveTrain.shouldBeClimbing = !driveTrain.shouldBeClimbing; - } - - @Override - protected void interrupted() { - end(); - } -}