From c3c43f87fda9d788fc388bf7cbbca85ab3e2d1b6 Mon Sep 17 00:00:00 2001 From: Kevin Cooney Date: Fri, 2 Jan 2026 18:13:09 -0800 Subject: [PATCH] Remove deprecated methods in Motor and MotorSubsystem --- .../com/team2813/lib2813/control/Motor.java | 10 -------- .../control/motors/TalonFXWrapper.java | 2 +- .../lib2813/subsystems/MotorSubsystem.java | 24 +++++++------------ 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/lib/src/main/java/com/team2813/lib2813/control/Motor.java b/lib/src/main/java/com/team2813/lib2813/control/Motor.java index c0cfad08..2ca5b6c9 100644 --- a/lib/src/main/java/com/team2813/lib2813/control/Motor.java +++ b/lib/src/main/java/com/team2813/lib2813/control/Motor.java @@ -45,16 +45,6 @@ public interface Motor { */ Current getAppliedCurrent(); - /** - * Stops the motor. - * - * @deprecated Use {@link #stopMotor()}. - */ - @Deprecated - default void disable() { - stopMotor(); - } - /** * Stops the motor. * diff --git a/lib/src/main/java/com/team2813/lib2813/control/motors/TalonFXWrapper.java b/lib/src/main/java/com/team2813/lib2813/control/motors/TalonFXWrapper.java index a336ed18..6d1163d9 100644 --- a/lib/src/main/java/com/team2813/lib2813/control/motors/TalonFXWrapper.java +++ b/lib/src/main/java/com/team2813/lib2813/control/motors/TalonFXWrapper.java @@ -168,7 +168,7 @@ public TalonFX motor() { /** * Sets the behavior the motor should exhibit upon receiving a request to stop: {@link - * MotorSubsystem#disable()} + * MotorSubsystem#stopMotor()} * * * - *

The PID Mode is enabled by calling {@link setSetpoint(T)}. The subsystem starts moving + *

The PID Mode is enabled by calling {@link #setSetpoint(T)}. The subsystem starts moving * toward the setpoint and maintains position at the setpoint under the control of the PID - * controller. The motor system's {@link isEnabled()} returns {@code true}. + * controller. The motor system's {@link #isEnabled()} returns {@code true}. * *

The Direct User Input Mode is activated when the user calls the {@link - * set(ControlType,double,double)} or {@link set(ControlType,double)} method, where the user + * #set(ControlMode,double,double)} or {@link #set(ControlMode,double)} method, where the user * provides direct input of type ControlType (specified via {@link - * MotorSubsystemConfiguration#controlMode(ControlType)}). The PID Mode is interrupted and - * disengaged, and {@link isEnabled()} returns {@code false}. It can be re-engaged with the {@link - * enable()} method and will resume movement toward setpoint. + * MotorSubsystemConfiguration#controlMode(ControlMode)}). The PID Mode is interrupted and + * disengaged, and {@link #isEnabled()} returns {@code false}. It can be re-engaged with the {@link + * #enable()} method and will resume movement toward setpoint. * * @param the type of the {@link Supplier} used to specify setpoints. */ @@ -180,8 +179,8 @@ public final void stopMotor() { * Returns whether the PID controller is engaged. * *

When the PID controller is engaged, the motor system is moving toward the user-specified - * setpoint position (set via {@link setSetpoint(T)}), or, if it has already reached the setpoint, - * is maintaining that position. + * setpoint position (set via {@link #setSetpoint(T)}), or, if it has already reached the + * setpoint, is maintaining that position. * * @return Whether the PID controller is engaged. */ @@ -204,15 +203,10 @@ public final void set(ControlMode mode, double demand) { /** * Clamps the given output value and provides it to the motor. * - *

This was protected and non-final to allow subclasses to clamp the output. Subclasses should - * override {@link #clampOutput(double)}. - * * @param output The output calculated by the PID algorithm. * @param setpoint Ignored. - * @deprecated Subclasses should override {@link #clampOutput(double)}. */ - @Deprecated - protected void useOutput(double output, double setpoint) { + private void useOutput(double output, double setpoint) { motor.set(controlMode, clampOutput(output)); }