Skip to content

Commit

Permalink
controller changes
Browse files Browse the repository at this point in the history
  • Loading branch information
roboblazers7617 committed Apr 5, 2024
1 parent 4a7727b commit 72f3b36
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 72f3b36

Please sign in to comment.