diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java index 04ada55..314ade0 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java @@ -64,10 +64,6 @@ public class OI JoystickButton climbUp = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.RIGHT_TRIGGER_AXIS); JoystickButton climbDown = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.LEFT_TRIGGER_AXIS); - //double speed = m_driverXbox.getRightTriggerAxis() - m_driverXbox.getLeftTriggerAxis(); - //climbUp.whenActive(new InitiateClimber(m_driverXbox.getRightTriggerAxis())); - //climbDown.whenActive(new InitiateClimber(-m_driverXbox.getLeftTriggerAxis())); - JoystickButton ratchetFlip = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.Y_BUTTON); ratchetFlip.whenPressed(new ratchetFlip(0.5)); ratchetFlip.whenReleased(new ratchetFlip(0)); diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java deleted file mode 100644 index 864ae5d..0000000 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/InitiateClimber.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.usfirst.frc4388.robot.commands; - -import org.usfirst.frc4388.robot.Robot; -import org.usfirst.frc4388.robot.Constants; - -import edu.wpi.first.wpilibj.command.Command; - -public class InitiateClimber extends Command -{ - static double SPEED; - public InitiateClimber(double speed) { - requires(Robot.climber); - this.SPEED = speed; - } - - @Override - protected void initialize() { - Robot.climber.setClimbSpeed(SPEED); - } - - @Override - protected void execute() { - - } - - // Make this return true when this Command no longer needs to run execute() - protected boolean isFinished() { - return true; - } - - // Called once after isFinished returns true - protected void end() { - } - - @Override - protected void interrupted() { - - } -} diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/ratchetFlip.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/ratchetFlip.java index e7c8c76..923e388 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/ratchetFlip.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/ratchetFlip.java @@ -15,9 +15,9 @@ public class ratchetFlip extends Command { // Called just before this Command runs the first time @Override protected void initialize() { - if (InitiateClimber.SPEED == 0){ + //if (InitiateClimber.SPEED == 0){ Robot.climber.flipRatchet(speed); - } + //} } // Called repeatedly when this Command is scheduled to run diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java index 9eb50b6..8c1fbb0 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/subsystems/Climber.java @@ -113,24 +113,6 @@ public class Climber extends Subsystem{ climberBack.set(0); } } - - ///DEPRICATED - public void setClimbSpeed(double speed) { - if (safetySwitch) { - if (isPressed.isRevLimitSwitchClosed() && speed < 0){ //If leg at min height, and the input would retract the leg - climberBack.set(0); - climberFront.set(0); - } - else if(isPressed.isFwdLimitSwitchClosed() && speed > 0){ //If leg at max height, and the input would extend the leg - climberBack.set(0); - climberFront.set(FRONT_FREQ * speed); - } - else { //If leg not at max height */ - climberBack.set(BACK_FREQ * speed); - climberFront.set(FRONT_FREQ * speed); - } - } - } public void safetySwitch(boolean safetySwitch){ this.safetySwitch = safetySwitch;