From a0a6776eeaea6e51718e60df8bef336657662cfb Mon Sep 17 00:00:00 2001 From: JosephTLockwood <56933815+JosephTLockwood@users.noreply.github.com> Date: Mon, 3 Feb 2025 10:17:09 -0500 Subject: [PATCH] Make arm match --- .../java/frc/robot/subsystems/arm/Arm.java | 22 +++++++++---------- .../robot/subsystems/flywheel/Flywheel.java | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/arm/Arm.java b/src/main/java/frc/robot/subsystems/arm/Arm.java index 4419b46..3daecac 100644 --- a/src/main/java/frc/robot/subsystems/arm/Arm.java +++ b/src/main/java/frc/robot/subsystems/arm/Arm.java @@ -110,21 +110,21 @@ private enum ArmMode { /** * Gets the current arm position mode. * - * @return The current ArmPosition + * @return The current ArmMode */ public ArmMode getMode() { return currentMode; } /** - * Sets a new arm position and schedules the corresponding command. + * Sets a new arm mode and schedules the corresponding command. * - * @param position The desired ArmPosition + * @param mode The desired ArmMode */ - private void setArmPosition(ArmMode position) { - if (currentMode != position) { + private void setArmMode(ArmMode mode) { + if (currentMode != mode) { currentCommand.cancel(); - currentMode = position; + currentMode = mode; currentCommand.schedule(); } } @@ -181,14 +181,14 @@ private Angle targetAngle() { } /** - * Creates a command to set the arm to a specific position. + * Creates a command to set the arm to a specific mode. * - * @param mode The desired arm position - * @return Command to set the position + * @param mode The desired arm mode + * @return Command to set the mode */ private Command setPositionCommand(ArmMode mode) { - return Commands.runOnce(() -> setArmPosition(mode)) - .withName("SetArmPosition(" + mode.toString() + ")"); + return Commands.runOnce(() -> setArmMode(mode)) + .withName("SetArmMode(" + mode.toString() + ")"); } /** Factory methods for common position commands */ diff --git a/src/main/java/frc/robot/subsystems/flywheel/Flywheel.java b/src/main/java/frc/robot/subsystems/flywheel/Flywheel.java index 434db20..5176f4c 100644 --- a/src/main/java/frc/robot/subsystems/flywheel/Flywheel.java +++ b/src/main/java/frc/robot/subsystems/flywheel/Flywheel.java @@ -178,7 +178,7 @@ private AngularVelocity targetSpeed() { */ private Command setVelocityCommand(FlywheelMode mode) { return Commands.runOnce(() -> setFlywheelMode(mode)) - .withName("SetFlywheelVelocity(" + mode.toString() + ")"); + .withName("SetFlywheelMode(" + mode.toString() + ")"); } /** Factory methods for common mode commands */