X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2FOI.java;h=05fb72dbbbf46fc6c1bad4c9df8adbddc679354b;hp=32ec06253e7be998195641cdaf87c114c52f935d;hb=25ef99e622af7d7dbd7ddb6c9c1a7ec7e71b0b77;hpb=cef1f36da71950bc32d74d2ba0477a51f478f209 diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index 32ec062..05fb72d 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -1,7 +1,6 @@ package org.usfirst.frc.team3501.robot; -import org.usfirst.frc.team3501.robot.commands.climber.MaintainClimbedPosition; -import org.usfirst.frc.team3501.robot.commands.climber.RunWinchContinuous; +import org.usfirst.frc.team3501.robot.commandgroups.ToggleWinch; import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear; import org.usfirst.frc.team3501.robot.commands.intake.ReverseIntakeContinuous; import org.usfirst.frc.team3501.robot.commands.intake.RunIntakeContinuous; @@ -18,7 +17,6 @@ public class OI { public static Joystick leftJoystick; public static Joystick rightJoystick; public static Button toggleWinch; - private boolean isClimbing = false; public static Button runIndexWheel; public static Button reverseIndexWheel; @@ -59,13 +57,13 @@ public class OI { toggleWinch = new JoystickButton(leftJoystick, Constants.OI.TOGGLE_WINCH_PORT); - if (!isClimbing) { - toggleWinch.whenPressed(new RunWinchContinuous()); - isClimbing = true; - } else { - toggleWinch.whenPressed(new MaintainClimbedPosition()); - isClimbing = false; - } + /* + * if (!Robot.getDriveTrain().isClimbing()) { toggleWinch.whenPressed(new + * RunWinchContinuous()); Robot.getDriveTrain().setClimbing(true); } else { + * toggleWinch.whenPressed(new MaintainClimbedPosition()); + * Robot.getDriveTrain().setClimbing(false); } + */ + toggleWinch.whenPressed(new ToggleWinch()); } public static OI getOI() {