diff --git a/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java b/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java index c33a905f..48ef98a7 100644 --- a/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java +++ b/lib/src/main/java/com/team2813/lib2813/subsystems/MotorSubsystem.java @@ -73,7 +73,7 @@ protected MotorSubsystem(MotorSubsystemConfiguration builder) { * * @param position the position to go to. */ - public final void setSetpoint(T position) { + public void setSetpoint(T position) { if (!isEnabled()) { enable(); } @@ -91,7 +91,7 @@ public final Command setSetpointCommand(T setpoint) { } /** Returns the current setpoint as an angle. */ - public final Angle getSetpoint() { + public Angle getSetpoint() { return rotationUnit.of(controller.getSetpoint()); } @@ -106,7 +106,7 @@ public final boolean atPosition() { *
Additionally, this method disables PID control of the subsystem */ @Override - public final void set(ControlMode mode, double demand, double feedForward) { + public void set(ControlMode mode, double demand, double feedForward) { if (isEnabled()) { disable(); } @@ -114,7 +114,7 @@ public final void set(ControlMode mode, double demand, double feedForward) { } @Override - public final Current getAppliedCurrent() { + public Current getAppliedCurrent() { return motor.getAppliedCurrent(); } @@ -124,7 +124,7 @@ public final Current getAppliedCurrent() { *
The motor voltage will be periodically updated to move the motor towards the current * setupoint. */ - public final void enable() { + public void enable() { isEnabled = true; } @@ -134,7 +134,7 @@ public final void enable() { *
The motor voltage will be set to zero, and the motor will not adjust to move towards the * current setpoint. */ - public final void disable() { + public void disable() { isEnabled = false; motor.disable(); } @@ -144,7 +144,7 @@ public final void disable() { * * @return Whether the controller is enabled. */ - public final boolean isEnabled() { + public boolean isEnabled() { return isEnabled; } @@ -155,7 +155,7 @@ public final boolean isEnabled() { * the provided value. */ @Override - public final void set(ControlMode mode, double demand) { + public void set(ControlMode mode, double demand) { isEnabled = false; motor.set(mode, demand); } @@ -197,7 +197,7 @@ protected double clampOutput(double output) { return output; } - protected final double getMeasurement() { + protected double getMeasurement() { return encoder.getPositionMeasure().in(rotationUnit); } @@ -208,7 +208,7 @@ public double position() { } @Override - public final Angle getPositionMeasure() { + public Angle getPositionMeasure() { return encoder.getPositionMeasure(); } @@ -219,7 +219,7 @@ public void setPosition(double position) { } @Override - public final void setPosition(Angle position) { + public void setPosition(Angle position) { encoder.setPosition(position); } @@ -230,7 +230,7 @@ public double getVelocity() { } @Override - public final AngularVelocity getVelocityMeasure() { + public AngularVelocity getVelocityMeasure() { return encoder.getVelocityMeasure(); }