Closed ProfessorAtomicManiac closed 1 month ago
Wow! I did not realize so much had changed. I think we might need to reevaluate what we need to update. In order:
SwerveModule
2024 update to Phoenix allows us to have both Phoenix 5 and Phoenix 6 as dependencies. I would opt for including them both so we can keep our old features while also giving us the ability to use new motors such as the Krakens. The CANCoder class is deprecated and it is recommended to use the v6 version. Phoenix 5 will stay so we don't have to remove the CANCoder classes, but I'd say we should do it now that we can safely install Phoenix 6.
@ProfessorAtomicManiac Is this PR/branch still relevant? Or is everything we actually want already in 2024-beta?
Originally we made the decision to update from Phoenix 5 to 6 so that when the CANcoders on the drivetrain are disconnected, the robot will switch to relative encoders. (Not yet tested, will update if updating to Phoenix 6 fixes the issue).
However, Phoenix 6 has a ton of changes, making this PR a very dangerous change. From what I gathered (Please double check that I got everything here correct): -TalonSRX and VictorSPX are no longer supported. The library only supports TalonFX. -All motor controllers and encoders support simulation and implement WPILIB's
MotorController
interface. Therefore all mock classes are no longer necessary and should be removed. This also meansErrorCodeAnswer.java
will not be used, so maybe consider removing it. -Nominal output has been removed. In general please double check I did the config for TalonFXs correctedly, since I couldn't find exact matches for some of the options. (Ex: DutyCycle in Phoenix 6 ?= Continuous in Phoenix 5). I also couldn't find where to put in timeouts for some of the functions. -CANcoders only return output from [0, 1] or [-0.5, 0.5] in rotations.