Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ public enum RobotEdition {
@AutoLogOutput boolean haveAutosGenerated = false;
private final LoggedDashboardChooser<Command> autoChooser = new LoggedDashboardChooser<>("Autos");

@AutoLogOutput(key = "Shooter/Hood/Has Zeroed")
private boolean hoodZeroed = false;

// temporarily override map with empty map to avoid collisions with reefscape elements
// unfortunately this also turns off collisions with walls but that's fine
// TODO update once rebuilt is added to maplesim
Expand Down Expand Up @@ -528,7 +531,19 @@ private void addControllerBindings(Indexer indexer, Shooter shooter, Intake inta
// TODO add binding for climb

// current zero shooter hood
driver.b().whileTrue(shooter.runCurrentZeroing());
new Trigger(() -> !hoodZeroed)
.or(driver.b())
.whileTrue(
shooter
.runCurrentZeroing()
.finallyDo(
interrupted -> {
if (!interrupted) {
hoodZeroed = true;
} else {
hoodZeroed = false;
}
}));

new Trigger(() -> intake.beambreak()).onTrue(driver.rumbleCmd(1, 1).withTimeout(0.5));

Expand Down