Using DifferentialDrive with TalonFX's for CAN

We’re trying to use DifferentialDrive for trajectory for pathweaver but it seems that motorcontrollergroup only wants PWMTalonFX’s. We have it coded for regular CAN TalonFX’s. Is there a way to setup a DifferentialDrive for TalonFX’s without wiring them to be PWM based?

You have to use the WPI_ wrapper classes.

1 Like

Are their API’s the same as just TalonFX?

The ordinary TalonFX API is unchanged, but they implement MotorController so that they can be passed to the WPI drive classes.

It remains unclear to me why this isn’t just implemented by default in BaseMotorController.

What do I import for WPI_TalonFX to work in Java?

You should be able to import the WPI_TalonFX class the same way you import the ordinary talon.