CrossTheRoadElec / Phoenix-api

CTRE Phoenix language API (targets FIRST Robotics Competition, Linux, RaspPi, Windows)
Other
39 stars 28 forks source link

WPI_TalonFX cannot be slaved #68

Closed qhdwight closed 4 years ago

qhdwight commented 4 years ago

From our testing, we could not get a WPI_TalonFX to follow another WPI_TalonFX. The master would spin, but the slave would remain idle with amber lights on. The issue can be fixed by:

Also, the javadoc stub for the WPI_TalonFX class seems to be incorrect. It is currently:

/**
 * CTRE Talon SRX Motor Controller when used on CAN Bus.
 */
public class WPI_TalonFX extends TalonFX implements SpeedController, Sendable
JCaporuscio commented 4 years ago

Motor Safety requires explicit Set() calls periodically.

So for any WPI_ Phoenix motor controller you will need to either disable motor safety or call the follow() function periodically.