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

Commit

Permalink
Fix evil intake stowing too early
Browse files Browse the repository at this point in the history
  • Loading branch information
rkanemoto committed Oct 10, 2023
1 parent d8c160a commit 6f9d82f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/frc/robot/managers/SuperstructureManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,13 @@ public Command getShelfIntakeCommand() {
}

public Command getShelfIntakeEvilCommand() {
return getCommand(States.INTAKING_CONE_SHELF_EVIL)
// Interrupt command early, start stowing as soon as we are holding a cone - don't wait
// until wrist is at goal (since it gets messed up after the impact with the shelf)
.until(() -> intake.getGamePiece() == HeldGamePiece.CONE)
return Commands.runOnce(() -> intake.setGamePiece(HeldGamePiece.NOTHING), intake)
.andThen(
getCommand(States.INTAKING_CONE_SHELF_EVIL)
// Interrupt command early, start stowing as soon as we are holding a cone - don't
// wait until wrist is at goal (since it gets messed up after the impact with the
// shelf)
.until(() -> intake.getGamePiece() == HeldGamePiece.CONE))
.andThen(getCommand(States.STOWED))
.withName("SuperstructureShelfIntakeEvil");
}
Expand Down

0 comments on commit 6f9d82f

Please sign in to comment.