Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
chore: Format.
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenheroux committed Apr 19, 2024
1 parent e141c82 commit 8afeb8f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/lib/AllianceFlipHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static boolean shouldFlip() {

/**
* Returns true if on red alliance.
*
*
* @return true if on red alliance.
*/
public static boolean isRedAlliance() {
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/frc/robot/auto/Auto.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/shooter/Shooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/frc/robot/shooter/ShooterState.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/superstructure/Superstructure.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8afeb8f

Please sign in to comment.