CrossTheRoadElec / Phoenix-Releases

Release repository for Phoenix-Framework and Phoenix-Tuner
76 stars 7 forks source link

Java: Return Swerve Modules as List #73

Open hamster1147 opened 5 months ago

hamster1147 commented 5 months ago

Currently the only convenient way to get swerve modules out of SwerveDrivetrain is by calling getModule(int) with an index. With no way to access module count internal to SwerveDrivetrain, there isn't a convenient way to iterate over the modules without null checking. A convenient solution is to have a getter function that returns the modules as a List<SwerveModule>.