Skip to content

Commit

Permalink
more trigger stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaldez7206 committed Sep 28, 2024
1 parent 60b9389 commit 289bc9e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ private void configureButtonBindings() {
.onTrue(elevatorWrist.homePosition());
// run action based on current state as incremented through operator states list
operator.a().and(OperatorState.isSpeakerMode).whileTrue(elevatorWrist.speakerPreset());
operator.a().and(OperatorState.isAmpMode).whileTrue(Commands
.either(elevatorWrist.ampPosition(), Commands.none(), this.intake.noteInIndexer));
operator.a().and(OperatorState.isAmpMode).and(this.intake.noteInIndexer)
.whileTrue(elevatorWrist.ampPosition());
operator.a().and(OperatorState.isShootWhileMoveMode).and(s_Swerve.seeAprilTag)
.whileTrue(new ShootWhileMoving(s_Swerve, driver, () -> s_Swerve.getPose(),
() -> FieldConstants.allianceFlip(FieldConstants.Speaker.centerSpeakerOpening)
Expand All @@ -271,12 +271,8 @@ private void configureButtonBindings() {
.whileTrue(new TurnToAngle(s_Swerve, Rotation2d.fromDegrees(25)).alongWith(elevatorWrist
.followPosition(() -> Constants.ElevatorWristConstants.SetPoints.HOME_HEIGHT,
() -> Constants.ElevatorWristConstants.SetPoints.PODIUM_ANGLE)));
operator.a().and(OperatorState.isClimbMode)
.whileTrue(Commands
.sequence(elevatorWrist.ampPosition(),
Commands.runOnce(() -> OperatorState.enableManualMode()))
.alongWith(new TeleopSwerve(s_Swerve, driver, Constants.Swerve.isFieldRelative,
Constants.Swerve.isOpenLoop)));
operator.a().and(OperatorState.isClimbMode).whileTrue(Commands.sequence(
elevatorWrist.ampPosition(), Commands.runOnce(() -> OperatorState.enableManualMode())));

// Toggle manual mode
operator.start().onTrue(Commands.runOnce(() -> {
Expand Down

0 comments on commit 289bc9e

Please sign in to comment.