Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
extra requirements for shootManual (not everything yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSkylake committed Mar 27, 2024
1 parent eebe901 commit 8865822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private void configureXboxControllerBindings() {
shooter.setVelocity(10);
}, RobotContainer.shooter)));

var shootManual = new Trigger(() -> driverController.getHID().getRightBumper());
var shootManual = new Trigger(() -> driverController.getHID().getRightBumper() && -shooter.getVelocity() > 8);
shootManual.onTrue(new InstantCommand(() -> shooter.feed()));
shootManual.onFalse(new WaitCommand(1).andThen(new InstantCommand(() -> {
RobotContainer.shooter.stopIndexer();
Expand Down Expand Up @@ -232,7 +232,7 @@ private void configureXboxControllerBindings() {

/** Binds commands to the operator stick. */
private void configureOperatorStickBindings() {
var shootManual = new Trigger(operatorStick::shootManual);
var shootManual = new Trigger(() -> operatorStick.shootManual() && -shooter.getVelocity() > 8);
shootManual.onTrue(new RampShooter(() -> 20).andThen(new InstantCommand(() -> shooter.feed())));
shootManual.onFalse(new WaitCommand(1).andThen(new InstantCommand(() -> {
RobotContainer.shooter.stopIndexer();
Expand Down

0 comments on commit 8865822

Please sign in to comment.