Skip to content

Commit

Permalink
added some logic to remove double calling rumble
Browse files Browse the repository at this point in the history
  • Loading branch information
elvizer committed Jan 24, 2025
1 parent b13d671 commit f3a8336
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public Robot(NetworkTableInstance ntInst) {
configureDriverBindings();
configureOperatorBindings();

new Trigger(_serializer::getBackBeam).onTrue(rumbleControllers(1, 1));
new Trigger(_serializer::getBackBeam).onTrue(rumbleControllers(1, 1).onlyIf(() -> Math.signum(_manipulator.getSpeed()) != 1));
new Trigger(_serializer::getBackBeam).onTrue(runOnce(() -> _currentPiece = Piece.NONE).onlyIf(() -> _currentPiece == Piece.CORAL));
new Trigger(() -> getCurrentPiece() == Piece.NONE).onChange(rumbleControllers(1, 1));

// a coral was passoff'ed
Expand Down

0 comments on commit f3a8336

Please sign in to comment.