From 8afeb8fe7730890675ec292f2d912fe3ae02940a Mon Sep 17 00:00:00 2001 From: Hayden Heroux Date: Thu, 18 Apr 2024 20:03:10 -0500 Subject: [PATCH] chore: Format. --- src/main/java/frc/lib/AllianceFlipHelper.java | 2 +- src/main/java/frc/robot/auto/Auto.java | 6 ++++-- src/main/java/frc/robot/shooter/Shooter.java | 2 +- src/main/java/frc/robot/shooter/ShooterState.java | 8 ++++++-- .../java/frc/robot/superstructure/Superstructure.java | 8 ++++---- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/frc/lib/AllianceFlipHelper.java b/src/main/java/frc/lib/AllianceFlipHelper.java index 091647d..cdaa33c 100644 --- a/src/main/java/frc/lib/AllianceFlipHelper.java +++ b/src/main/java/frc/lib/AllianceFlipHelper.java @@ -16,7 +16,7 @@ public static boolean shouldFlip() { /** * Returns true if on red alliance. - * + * * @return true if on red alliance. */ public static boolean isRedAlliance() { diff --git a/src/main/java/frc/robot/auto/Auto.java b/src/main/java/frc/robot/auto/Auto.java index b4ac458..e91b342 100644 --- a/src/main/java/frc/robot/auto/Auto.java +++ b/src/main/java/frc/robot/auto/Auto.java @@ -71,8 +71,10 @@ private Auto() { swerve); NamedCommands.registerCommand("stow", superstructure.stow()); - NamedCommands.registerCommand("shoot", superstructure.subwoofer().withTimeout(1.5)); // 1 second could work - NamedCommands.registerCommand("shootNoPull", superstructure.subwooferNoPull().withTimeout(1.5)); // 1 second could work + NamedCommands.registerCommand( + "shoot", superstructure.subwoofer().withTimeout(1.5)); // 1 second could work + NamedCommands.registerCommand( + "shootNoPull", superstructure.subwooferNoPull().withTimeout(1.5)); // 1 second could work NamedCommands.registerCommand("intake", superstructure.intakeInstant()); autoChooser = AutoBuilder.buildAutoChooser(); diff --git a/src/main/java/frc/robot/shooter/Shooter.java b/src/main/java/frc/robot/shooter/Shooter.java index db66827..2e97aa9 100644 --- a/src/main/java/frc/robot/shooter/Shooter.java +++ b/src/main/java/frc/robot/shooter/Shooter.java @@ -83,7 +83,7 @@ public void addToShuffleboard(ShuffleboardTab tab) { private boolean serializerCurrentSpike() { return serializerValues.motorAmps > SerializerConstants.NOTE_AMPS; - } + } public Trigger serializedNote() { return new Trigger(this::serializerCurrentSpike); diff --git a/src/main/java/frc/robot/shooter/ShooterState.java b/src/main/java/frc/robot/shooter/ShooterState.java index cb0d745..3f54e3d 100644 --- a/src/main/java/frc/robot/shooter/ShooterState.java +++ b/src/main/java/frc/robot/shooter/ShooterState.java @@ -42,8 +42,12 @@ public record ShooterState( public boolean at(ShooterState other) { return MathUtil.isNear( - flywheelVelocityRotationsPerSecond, other.flywheelVelocityRotationsPerSecond, FlywheelConstants.TOLERANCE) + flywheelVelocityRotationsPerSecond, + other.flywheelVelocityRotationsPerSecond, + FlywheelConstants.TOLERANCE) && MathUtil.isNear( - serializerVelocityRotationsPerSecond, other.serializerVelocityRotationsPerSecond, SerializerConstants.TOLERANCE); + serializerVelocityRotationsPerSecond, + other.serializerVelocityRotationsPerSecond, + SerializerConstants.TOLERANCE); } } diff --git a/src/main/java/frc/robot/superstructure/Superstructure.java b/src/main/java/frc/robot/superstructure/Superstructure.java index 0df8a52..f287d28 100644 --- a/src/main/java/frc/robot/superstructure/Superstructure.java +++ b/src/main/java/frc/robot/superstructure/Superstructure.java @@ -171,13 +171,13 @@ private Command shoot(SuperstructureState shot) { private Command shootNoPull(SuperstructureState shot) { return ready(shot) - .andThen(Commands.waitSeconds(SuperstructureConstants.READY_PAUSE_DURATION)) - .andThen(hold(shot)); + .andThen(Commands.waitSeconds(SuperstructureConstants.READY_PAUSE_DURATION)) + .andThen(hold(shot)); } - + public Command subwooferNoPull() { return shootNoPull(SuperstructureState.SUBWOOFER).withName("SUBWOOFER_NO_PULL"); - } + } public Command subwoofer() { return shoot(SuperstructureState.SUBWOOFER).withName("SUBWOOFER");