From 313608541b0b2f99a0fca41685dd9e3685eca7b3 Mon Sep 17 00:00:00 2001 From: SCool62 Date: Sat, 7 Feb 2026 17:17:47 -0800 Subject: [PATCH 1/2] Zero on startup --- src/main/java/frc/robot/Robot.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index dbedcf8..cbc419f 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -184,6 +184,8 @@ public enum RobotEdition { @AutoLogOutput boolean haveAutosGenerated = false; private final LoggedDashboardChooser 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 @@ -528,7 +530,16 @@ 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)); From 49ed8414da57f6143faf6b033c9f0e8a09d1c6e0 Mon Sep 17 00:00:00 2001 From: SCool62 Date: Sat, 7 Feb 2026 22:03:42 -0800 Subject: [PATCH 2/2] Spotless --- src/main/java/frc/robot/Robot.java | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index cbc419f..f198faa 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -184,7 +184,8 @@ public enum RobotEdition { @AutoLogOutput boolean haveAutosGenerated = false; private final LoggedDashboardChooser autoChooser = new LoggedDashboardChooser<>("Autos"); - @AutoLogOutput(key = "Shooter/Hood/Has Zeroed") private boolean hoodZeroed = false; + @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 @@ -531,15 +532,18 @@ private void addControllerBindings(Indexer indexer, Shooter shooter, Intake inta // current zero shooter hood new Trigger(() -> !hoodZeroed) - .or(driver.b()) - .whileTrue(shooter.runCurrentZeroing().finallyDo(interrupted -> { - if (!interrupted) { - hoodZeroed = true; - } - else { - hoodZeroed = false; - } - })); + .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));