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.commands.climber.ToggleWinch;
import org.usfirst.frc.team3501.robot.commands.driving.ToggleGear;
import org.usfirst.frc.team3501.robot.commands.intake.ReverseIntakeContinuous;
public static Joystick leftJoystick;
public static Joystick rightJoystick;
public static Button toggleWinch;
+ private boolean isClimbing = false;
public static Button runIndexWheel;
public static Button reverseIndexWheel;
decreaseShooterSpeed = new JoystickButton(leftJoystick,
Constants.OI.DECREASE_SHOOTER_SPEED_PORT);
decreaseShooterSpeed.whenPressed(new DecreaseShootingSpeed());
+
+ if (!isClimbing) {
+ toggleWinch.whenPressed(new RunWinchContinuous());
+ isClimbing = true;
+ } else {
+ toggleWinch.whenPressed(new MaintainClimbedPosition());
+ isClimbing = false;
+ }
}
public static OI getOI() {