Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Comment thread
spderman3333 marked this conversation as resolved.
if (!isEnabled()) {
enable();
}
Expand All @@ -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());
}

Expand All @@ -106,15 +106,15 @@ public final boolean atPosition() {
* <p>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();
}
motor.set(mode, demand, feedForward);
}

@Override
public final Current getAppliedCurrent() {
public Current getAppliedCurrent() {
return motor.getAppliedCurrent();
}

Expand All @@ -124,7 +124,7 @@ public final Current getAppliedCurrent() {
* <p>The motor voltage will be periodically updated to move the motor towards the current
* setupoint.
*/
public final void enable() {
public void enable() {
isEnabled = true;
}

Expand All @@ -134,7 +134,7 @@ public final void enable() {
* <p>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();
}
Expand All @@ -144,7 +144,7 @@ public final void disable() {
*
* @return Whether the controller is enabled.
*/
public final boolean isEnabled() {
public boolean isEnabled() {
return isEnabled;
}

Expand All @@ -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);
}
Expand Down Expand Up @@ -197,7 +197,7 @@ protected double clampOutput(double output) {
return output;
}

protected final double getMeasurement() {
protected double getMeasurement() {
return encoder.getPositionMeasure().in(rotationUnit);
}

Expand All @@ -208,7 +208,7 @@ public double position() {
}

@Override
public final Angle getPositionMeasure() {
public Angle getPositionMeasure() {
return encoder.getPositionMeasure();
}

Expand All @@ -219,7 +219,7 @@ public void setPosition(double position) {
}

@Override
public final void setPosition(Angle position) {
public void setPosition(Angle position) {
encoder.setPosition(position);
}

Expand All @@ -230,7 +230,7 @@ public double getVelocity() {
}

@Override
public final AngularVelocity getVelocityMeasure() {
public AngularVelocity getVelocityMeasure() {
return encoder.getVelocityMeasure();
}

Expand Down
Loading