From 72f3b366f5f36bcd35324627416df63eb78ec594 Mon Sep 17 00:00:00 2001 From: roboblazers7617 <62038235+roboblazers7617@users.noreply.github.com> Date: Fri, 5 Apr 2024 14:07:20 -0400 Subject: [PATCH] controller changes --- src/main/java/frc/robot/RobotContainer.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 486c305..d3d9c29 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -200,19 +200,16 @@ private void configureOperatorBindings(){ operatorControllerCommands.b().and(() -> !isClimbMode).onTrue(MechanismCommands.IntakeSource(driverController, operatorController, arm, head)); operatorControllerCommands.leftTrigger().onTrue(MechanismCommands.PrepareShoot(operatorController, arm, head, ShootingPosition.AMP)); - operatorControllerCommands.leftBumper().onTrue(MechanismCommands.Shoot(driverController, operatorController, arm, head)); + operatorControllerCommands.leftBumper().onTrue(MechanismCommands.PrepareShoot(operatorController, arm, head, drivetrain::getDistanceToSpeaker)); operatorControllerCommands.rightTrigger().onTrue(MechanismCommands.PrepareShoot(operatorController, arm, head, ShootingPosition.PODIUM)).onFalse(MechanismCommands.Shoot(driverController, operatorController, arm, head)); operatorControllerCommands.rightBumper().onTrue(MechanismCommands.PrepareShoot(operatorController, arm, head, ShootingPosition.SUBWOOFER)).onFalse(MechanismCommands.Shoot(driverController, operatorController, arm, head)); - operatorControllerCommands.povLeft() - .and(() -> (!isClimbMode)) - .whileTrue(head.StopIntake().andThen(head.SpinDownShooter())); - operatorControllerCommands.povRight() - .and(() -> (!isClimbMode)) - .onTrue(MechanismCommands.PrepareShoot(operatorController, arm, head, drivetrain::getDistanceToSpeaker).alongWith(Commands.runOnce(() -> System.out.println(outputValues(drivetrain::getDistanceToSpeaker, arm::getArmAbsoluteEncoderPosition))))); + operatorControllerCommands.povLeft().onTrue(head.StopIntake().andThen(head.SpinDownShooter())); + operatorControllerCommands.povRight().onTrue(MechanismCommands.Shoot(driverController, operatorController, arm, head)); + operatorControllerCommands.povUp().onTrue(Commands.runOnce(() -> climber.setSpeed(ClimberConstants.CLIMB_RATE, ClimberConstants.CLIMB_RATE), climber)).onFalse(Commands.runOnce(() -> climber.setSpeed(0, 0), climber)); operatorControllerCommands.povDown().onTrue(Commands.runOnce(() -> climber.setSpeed(-ClimberConstants.CLIMB_RATE, -ClimberConstants.CLIMB_RATE), climber)).onFalse(Commands.runOnce(() -> climber.setSpeed(0, 0), climber));