From 56661d35939e7a5df5508352f7a3c147dfca815d Mon Sep 17 00:00:00 2001 From: IanTapply22 Date: Tue, 19 Dec 2023 11:02:10 -0500 Subject: [PATCH] Renamed IntakeGamepieces enum to IntakeGamepiece --- .../frc/robot/subsystems/intake/IntakeSubsystem.java | 10 +++++----- .../{IntakeGamepieces.java => IntakeGamepiece.java} | 2 +- .../robot/subsystems/intake/states/ScoringState.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) rename src/main/java/frc/robot/subsystems/intake/enums/{IntakeGamepieces.java => IntakeGamepiece.java} (66%) diff --git a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java index 6cb208e..94ec8c9 100644 --- a/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/intake/IntakeSubsystem.java @@ -6,7 +6,7 @@ import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.SubsystemBase; -import frc.robot.subsystems.intake.enums.IntakeGamepieces; +import frc.robot.subsystems.intake.enums.IntakeGamepiece; import frc.robot.subsystems.intake.states.ScoringState; /** @@ -56,7 +56,7 @@ public Command stopIntakeCommand() { * @param expectedPiece the type of gamepiece to expect when scoring * @return a command that scores a gamepiece */ - public Command intakeScoreCommand(ScoringState scoringState, IntakeGamepieces expectedGamepiece) { + public Command intakeScoreCommand(ScoringState scoringState, IntakeGamepiece expectedGamepiece) { SmartDashboard.putString("INTAKE STATE", scoringState.getStateName()); return run(() -> { @@ -74,7 +74,7 @@ public Command intakeScoreCommand(ScoringState scoringState, IntakeGamepieces ex * @param gamepiece the type of gamepiece to expect * @return a command that forces the intake to hold the specified gamepiece */ - public Command intakeHoldCommand(IntakeGamepieces gamepiece) { + public Command intakeHoldCommand(IntakeGamepiece gamepiece) { return run(() -> { this.intakeMotor.set(IntakeConstants.INTAKING_SPEED); @@ -85,12 +85,12 @@ public Command intakeHoldCommand(IntakeGamepieces gamepiece) { this.pdp.getCurrent(IntakeConstants.INTAKE_MOTOR_CHANNEL) < IntakeConstants.INTAKE_AMP_THRESHOLD); - if (gamepiece.equals(IntakeGamepieces.CUBE)) { + if (gamepiece.equals(IntakeGamepiece.CUBE)) { // wait a short amount of time so the gamepiece gets pulled in Commands.waitSeconds(IntakeConstants.INTAKE_CUBE_DELAY); this.intakeMotor.set(IntakeConstants.HOLD_CUBE_SPEED); } - if (gamepiece.equals(IntakeGamepieces.CONE)) { + if (gamepiece.equals(IntakeGamepiece.CONE)) { // we have a cone, so run the motor at a higher speed Commands.waitSeconds(IntakeConstants.INTAKE_CONE_DELAY); this.intakeMotor.set(IntakeConstants.HOLD_CONE_SPEED); diff --git a/src/main/java/frc/robot/subsystems/intake/enums/IntakeGamepieces.java b/src/main/java/frc/robot/subsystems/intake/enums/IntakeGamepiece.java similarity index 66% rename from src/main/java/frc/robot/subsystems/intake/enums/IntakeGamepieces.java rename to src/main/java/frc/robot/subsystems/intake/enums/IntakeGamepiece.java index 3a87c37..4fccfd5 100644 --- a/src/main/java/frc/robot/subsystems/intake/enums/IntakeGamepieces.java +++ b/src/main/java/frc/robot/subsystems/intake/enums/IntakeGamepiece.java @@ -1,6 +1,6 @@ package frc.robot.subsystems.intake.enums; -public enum IntakeGamepieces { +public enum IntakeGamepiece { CONE, CUBE } diff --git a/src/main/java/frc/robot/subsystems/intake/states/ScoringState.java b/src/main/java/frc/robot/subsystems/intake/states/ScoringState.java index 35a47c2..3260774 100644 --- a/src/main/java/frc/robot/subsystems/intake/states/ScoringState.java +++ b/src/main/java/frc/robot/subsystems/intake/states/ScoringState.java @@ -1,6 +1,6 @@ package frc.robot.subsystems.intake.states; -import frc.robot.subsystems.intake.enums.IntakeGamepieces; +import frc.robot.subsystems.intake.enums.IntakeGamepiece; public abstract class ScoringState { double outtakeSpeed; @@ -48,7 +48,7 @@ public String getStateName() { * * @return The outtake speed for the scoring state */ - public double getOuttakeSpeed(IntakeGamepieces expectedGamepiece) { + public double getOuttakeSpeed(IntakeGamepiece expectedGamepiece) { if (expectedGamepiece == null) { return this.outtakeSpeed; }