Skip to content

Commit

Permalink
fix: only feed to shooter if targeting is scheduled
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed Mar 30, 2024
1 parent d1217e0 commit 0113080
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/org/team1540/robot2024/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,13 @@ private void configureButtonBindings() {

copilot.x().whileTrue(new ShootSequence(shooter, indexer));
copilot.a().whileTrue(new AmpScoreStageSequence(indexer, tramp, elevator).alongWith(ampLock));
copilot.b().and(shooter::areFlywheelsSpunUp).whileTrue(IntakeAndFeed.withDefaults(indexer))
.onFalse(cancelAlignment);
copilot.b()
.and(shooter::areFlywheelsSpunUp)
.and(() -> targetDrive.isScheduled()
|| overstageTargetDrive.isScheduled()
|| autoShooterCommand.isScheduled())
.whileTrue(IntakeAndFeed.withDefaults(indexer))
.onFalse(cancelAlignment);
copilot.y().whileTrue(new StageTrampCommand(tramp, indexer));

// copilot.leftTrigger(0.5).whileTrue(new ElevatorSetpointCommand(elevator, ElevatorState.CLIMB));
Expand Down

0 comments on commit 0113080

Please sign in to comment.