WPI_TalonFX

class phoenix5.WPI_TalonFX(deviceNumber: int, canbus: str = '')

Bases: TalonFX, WPI_BaseMotorController

CTRE Talon FX Motor Controller when used on CAN Bus.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

Deprecated:

This device’s Phoenix 5 API is deprecated for removal in the 2025 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

Constructor for a WPI_TalonFX

Parameters:
  • deviceNumber – Device ID of TalonFX

  • canbus – Name of the CANbus; can be a CANivore device name or serial number. Pass in nothing or “rio” to use the roboRIO.

configSelectedFeedbackSensor(*args, **kwargs)

Overloaded function.

  1. configSelectedFeedbackSensor(self: phoenix5._ctre.WPI_TalonFX, feedbackDevice: phoenix5._ctre.FeedbackDevice, pidIdx: int = 0, timeoutMs: int = 0) -> phoenix5._ctre.ErrorCode

  2. configSelectedFeedbackSensor(self: phoenix5._ctre.WPI_TalonFX, feedbackDevice: phoenix5._ctre.RemoteFeedbackDevice, pidIdx: int = 0, timeoutMs: int = 0) -> phoenix5._ctre.ErrorCode

set(*args, **kwargs)

Overloaded function.

  1. set(self: phoenix5._ctre.WPI_TalonFX, value: float) -> None

  2. set(self: phoenix5._ctre.WPI_TalonFX, mode: phoenix5._ctre.ControlMode, value: float) -> None

  3. set(self: phoenix5._ctre.WPI_TalonFX, mode: phoenix5._ctre.ControlMode, demand0: float, demand1Type: phoenix5._ctre.DemandType, demand1: float) -> None

  4. set(self: phoenix5._ctre.WPI_TalonFX, mode: phoenix5._ctre.TalonFXControlMode, value: float) -> None

  5. set(self: phoenix5._ctre.WPI_TalonFX, mode: phoenix5._ctre.TalonFXControlMode, demand0: float, demand1Type: phoenix5._ctre.DemandType, demand1: float) -> None

setInverted(*args, **kwargs)

Overloaded function.

  1. setInverted(self: phoenix5._ctre.WPI_TalonFX, invertType: phoenix5._ctre.TalonFXInvertType) -> None

  2. setInverted(self: phoenix5._ctre.WPI_TalonFX, invertType: phoenix5._ctre.InvertType) -> None

  3. setInverted(self: phoenix5._ctre.WPI_TalonFX, bInvert: bool) -> None

setVoltage(output: wpimath.units.volts) None