Skip to content

Commit

Permalink
Changed SwerveModule.java in "drive" folder
Browse files Browse the repository at this point in the history
to SwerveModuleInterface.java, changing from
an abstract class to interface. Made SwerveModule.java
in "Swerves" folder implement SwerveModuleInterface.java.
  • Loading branch information
WillisBurr committed Sep 17, 2024
1 parent a767b80 commit 203dd37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
import edu.wpi.first.units.Measure;
import edu.wpi.first.units.Velocity;

public abstract class SwerveModule {
public interface SwerveModuleInterface {

protected abstract void periodic();
public void set(SwerveModuleState state);

protected abstract void simulationPeriodic();
public SwerveModuleState getState();

public abstract void set(SwerveModuleState state);
public SwerveModulePosition getPosition();

public abstract SwerveModuleState getState();
public ModuleLocation getModuleLocation();

public abstract SwerveModulePosition getPosition();
public Translation2d getModuleCoordinate();

public abstract ModuleLocation getModuleLocation();

public abstract Translation2d getModuleCoordinate();

public abstract Measure<Velocity<Distance>> getDriveVelocity();
public Measure<Velocity<Distance>> getDriveVelocity();
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import edu.wpi.first.wpilibj2.command.button.RobotModeTriggers;

/** REV MAXSwerve module */
public class SwerveModule implements AutoCloseable {
public class SwerveModule implements AutoCloseable, SwerveModule {
/**
* MAXSwerve module hardware
*/
Expand Down

0 comments on commit 203dd37

Please sign in to comment.