Skip to content

Commit

Permalink
Added reverse and changed button bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Liammurray19 committed Jan 21, 2025
1 parent fcc291d commit f2971dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public void configureButtonBindings() {

driveController.a().onTrue(outtake.spinIn());
driveController.b().whileTrue(outtake.spinOut());
driveController.x().whileTrue(outtake.spinOutL1());
driveController.y().whileTrue(algaeDestage.destageAlgae());
driveController.x().whileTrue(outtake.reverse());
driveController.y().whileTrue(outtake.spinOutL1());

}

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/frc/robot/subsystems/Outtake.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class Outtake extends LoggedSubsystem<Data, OuttakeMap> {
private final double RELEASE_SPEEDLEFT = 0.1;
private final double INTAKE_SPEED = 0.3;
private final double RELEASE_DELAY = 1;
private final double REVERSE = -0.5;
private final double DELAY = 0.0;

public Outtake(OuttakeMap outtakeMap) {
Expand Down Expand Up @@ -41,6 +42,13 @@ public Command spinIn() {
}).until(() -> getData().gamePieceDetected).andThen(safeStateCmd());
}

public Command reverse() {
return runSafe(() -> {
getData().leftWheel.setpoint = REVERSE;
getData().rightWheel.setpoint = REVERSE;
});
}

@Override
public void reset() {
safeState();
Expand Down

0 comments on commit f2971dd

Please sign in to comment.