Skip to content

Commit

Permalink
Added the override tag
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTinker64 committed Sep 17, 2023
1 parent 5061c4d commit 7d1a703
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/subsystems/GoalSwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ public class GoalSwerveModule implements SwerveModule {
private SwerveModuleState state = new SwerveModuleState();
private double distance;

@Override
public SwerveModuleState getState() {
return state;
}

@Override
public SwerveModulePosition getPosition() {
return new SwerveModulePosition(distance, state.angle);
}

@Override
public void setDesiredState(SwerveModuleState desiredState) {
state = SwerveModuleState.optimize(desiredState, state.angle);
distance += state.speedMetersPerSecond * 0.02;
}

@Override
public SwerveModuleState getDesiredState() {
return state;
}

@Override
public void resetEncoders() {}

}

0 comments on commit 7d1a703

Please sign in to comment.