Package frc.spectrumLib.talonFX
Class TalonFXFactory
java.lang.Object
frc.spectrumLib.talonFX.TalonFXFactory
Creates CANTalon objects and configures all the parameters we care about to factory defaults.
Closed-loop and sensor parameters are not set, as these are expected to be set by the
application.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.ctre.phoenix6.hardware.TalonFXcreateConfigTalon(CanDeviceId id, com.ctre.phoenix6.configs.TalonFXConfiguration config) static com.ctre.phoenix6.hardware.TalonFXstatic com.ctre.phoenix6.hardware.TalonFXcreatePermanentFollowerTalon(CanDeviceId followerId, com.ctre.phoenix6.hardware.TalonFX leaderTalonFX, com.ctre.phoenix6.signals.MotorAlignmentValue motorAlignment) Follow the motor output of another Talon.static com.ctre.phoenix6.configs.TalonFXConfiguration
-
Method Details
-
createDefaultTalon
-
createConfigTalon
public static com.ctre.phoenix6.hardware.TalonFX createConfigTalon(CanDeviceId id, com.ctre.phoenix6.configs.TalonFXConfiguration config) -
createPermanentFollowerTalon
public static com.ctre.phoenix6.hardware.TalonFX createPermanentFollowerTalon(CanDeviceId followerId, com.ctre.phoenix6.hardware.TalonFX leaderTalonFX, com.ctre.phoenix6.signals.MotorAlignmentValue motorAlignment) Follow the motor output of another Talon.- Parameters:
followerId- Device ID of the follower.leaderTalonFX- The leader TalonFX to follow.motorAlignment- Set to Aligned for motor invert to match the leader's configured Invert - which is typical when leader and follower are mechanically linked and spin in the same direction. Set to Opposed for motor invert to oppose the leader's configured Invert - this is typical where the leader and follower mechanically spin in opposite directions..
-
getDefaultConfig
public static com.ctre.phoenix6.configs.TalonFXConfiguration getDefaultConfig()
-