X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fdriving%2FToggleDrivePiston.java;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fdriving%2FToggleDrivePiston.java;h=0000000000000000000000000000000000000000;hb=6b2fc22f2340904faee55cf5c84c57f59188f1d9;hp=ad13cc0084e38bb7f23284c4660850a9bea752e9;hpb=fe04fc8e547ee347079730ca38e1a529f870b00c;p=3501%2F2017steamworks diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleDrivePiston.java b/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleDrivePiston.java deleted file mode 100644 index ad13cc0..0000000 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/ToggleDrivePiston.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.usfirst.frc.team3501.robot.commands.driving; - -import org.usfirst.frc.team3501.robot.Constants; -import org.usfirst.frc.team3501.robot.Robot; -import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; -import edu.wpi.first.wpilibj.command.Command; - -public class ToggleDrivePiston extends Command { - private DriveTrain driveTrain = Robot.getDriveTrain(); - - /** - * See JavaDoc comment in class for details - * - * @param motorVal - * value range from -1 to 1 - */ - public ToggleDrivePiston() { - requires(driveTrain); - } - - // Called just before this Command runs the first time - @Override - protected void initialize() { - } - - // Called repeatedly when this Command is scheduled to run - @Override - protected void execute() { - if (DriveTrain.getDriveTrain() - .getLeftGearPistonValue() == Constants.DriveTrain.HIGH_GEAR) { - DriveTrain.getDriveTrain().setLowGear(); - } else { - DriveTrain.getDriveTrain().setHighGear(); - } - - // check to make sure that both pistons are set to the same gear. Otherwise, - // the code must be changed - } - - // Called once after isFinished returns true - @Override - protected void end() { - } - - // Called when another command which requires one or more of the same - // subsystems is scheduled to run - @Override - protected void interrupted() { - end(); - } - - @Override - protected boolean isFinished() { - return false; - - } - -}