Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions lib/src/main/java/com/team2813/lib2813/control/Motor.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ public interface Motor {
*/
Current getAppliedCurrent();

/**
* Stops the motor.
*
* @deprecated Use {@link #stopMotor()}.
*/
@Deprecated
default void disable() {
stopMotor();
}

/**
* Stops the motor.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
*
* <ul>
* <li>Coast: The motor stops applying an input, but continues to move with its inertia.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static edu.wpi.first.units.Units.Amps;
import static edu.wpi.first.units.Units.Rotations;

import com.revrobotics.spark.SparkBase.ControlType;
import com.team2813.lib2813.control.ControlMode;
import com.team2813.lib2813.control.Encoder;
import com.team2813.lib2813.control.Motor;
Expand Down Expand Up @@ -51,16 +50,16 @@
* voltage or duty cycle).
* </ul>
*
* <p>The <b>PID Mode</b> is enabled by calling {@link setSetpoint(T)}. The subsystem starts moving
* <p>The <b>PID Mode</b> 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}.
*
* <p>The <b>Direct User Input Mode</b> 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 <T> the type of the {@link Supplier<Angle>} used to specify setpoints.
*/
Expand Down Expand Up @@ -180,8 +179,8 @@ public final void stopMotor() {
* Returns whether the PID controller is engaged.
*
* <p>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.
*/
Expand All @@ -204,15 +203,10 @@ public final void set(ControlMode mode, double demand) {
/**
* Clamps the given output value and provides it to the motor.
*
* <p>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));
}

Expand Down
Loading