4H-ALARM / 2024-Hydra

Other
0 stars 2 forks source link

Convert SwerveModule to an interface with subclasses #3

Closed nicholastmosher closed 9 months ago

nicholastmosher commented 9 months ago

This should let us use differently-configured swerve modules in the Swerve subsystem. For example, the test robot uses TalonFX for both drive and steering, so we can construct a Swerve subsystem using the SwerveModuleTalonTalon subclass, and for the new robot that uses a TalonFX to drive and a Neo to steer, we can use SwerveModuleTalonNeo instead. If there are any other combinations of motors/controllers used in swerve modules, we can just implement another subclass of SwerveModule.