Skip to content

Commit

Permalink
run intake when elevator goes up to "send" it into the ampper a littl…
Browse files Browse the repository at this point in the history
…e bit more
  • Loading branch information
PatribotsProgramming committed Apr 18, 2024
1 parent d26f974 commit b085614
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,10 @@ private void configureSoloDiverBindings(PatriBoxController controller) {
.onFalse(pieceControl.stopIntakeAndIndexer().alongWith(shooterCmds.raisePivot()));

controller.b()
.onTrue(pieceControl.noteToTrap3().andThen(elevator.toTopCommand()).andThen(pieceControl.prepPiece()));
.onTrue(pieceControl.noteToTrap3()
.andThen(
elevator.toTopCommand().deadlineWith(intake.inCommand()).andThen(intake.stopCommand()),
pieceControl.prepPiece()));

// If this is nice to work with, then we keep it. If not... bye bye!
new Trigger(() -> elevator.getDesiredPosition() == ElevatorConstants.TRAP_PLACE_POS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public Command intakeForDoubleAmp() {
}

public Command doubleAmpElevatorEnd() {
return Commands.either(elevatorToTop(), elevatorToBottom(), this::doubleAmpTimerReady);
return Commands.either(elevatorToTop().deadlineWith(intake.inCommand()).andThen(intake.stopCommand()), elevatorToBottom(), this::doubleAmpTimerReady);
}

public Command blepNote() {
Expand Down

0 comments on commit b085614

Please sign in to comment.