BroncBotz3481/YAGSL-Example

2024 TalonFX Motion Magic voltage control expects rotations, but is given degrees

jbko6 opened this issue · 0 comments

We're not entirely sure why, but the Motion Magic voltage control mode is still expecting rotations instead of degrees even after the conversion factor is applied. To get our angle motors working on our robot, we had to set the conversion factor to Gear ratio * Encoder resolution which evaluated out to 12.8 in our case (if you are confused why we don't use 1/12.8, we decided to fix the inversion issue discussed in #126 by inverting our conversion factors at the source).

Next, we had to convert degrees to rotations wherever setReference, getVelocity, getPosition, and setPosition are used on our angle motors. We've investigated this issue a lot but we haven't been able to figure it out. Any clarity there would be appreciated.

Here's our working YAGSL swerve repo.
We're running Falcon 500 for both drive and angle motors, CANCoder for our encoders. MK4 SDS modules with L1 gears.