CTRE Phoenix Pro C++ 23.0.12
ctre::phoenixpro::hardware::core::CoreTalonFX Class Reference

Class description for the Talon FX integrated motor controller that runs on associated Falcon motors. More...

#include <ctre/phoenixpro/core/CoreTalonFX.hpp>

Inheritance diagram for ctre::phoenixpro::hardware::core::CoreTalonFX:
ctre::phoenixpro::hardware::ParentDevice ctre::phoenixpro::hardware::TalonFX

Public Member Functions

 CoreTalonFX (int deviceId, std::string canbus="")
 Constructs a new Talon FX motor controller object. More...
 
 CoreTalonFX (CoreTalonFX const &)=delete
 
CoreTalonFXoperator= (CoreTalonFX const &)=delete
 
bool HasResetOccurred ()
 
configs::TalonFXConfiguratorGetConfigurator ()
 Gets the configurator for this TalonFX. More...
 
configs::TalonFXConfigurator const & GetConfigurator () const
 Gets the configurator for this TalonFX. More...
 
sim::TalonFXSimStateGetSimState ()
 Get the simulation state for this device. More...
 
StatusSignalValue< int > & GetVersionMajor ()
 App Major Version number. More...
 
StatusSignalValue< int > & GetVersionMinor ()
 App Minor Version number. More...
 
StatusSignalValue< int > & GetVersionBugfix ()
 App Bugfix Version number. More...
 
StatusSignalValue< int > & GetVersionBuild ()
 App Build Version number. More...
 
StatusSignalValue< int > & GetVersion ()
 Full Version. More...
 
StatusSignalValue< int > & GetFaultField ()
 Integer representing all faults. More...
 
StatusSignalValue< int > & GetStickyFaultField ()
 Integer representing all sticky faults. More...
 
StatusSignalValue< signals::ForwardLimitValue > & GetForwardLimit ()
 Forward Limit Pin. More...
 
StatusSignalValue< signals::ReverseLimitValue > & GetReverseLimit ()
 Reverse Limit Pin. More...
 
StatusSignalValue< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity ()
 The applied rotor polarity. More...
 
StatusSignalValue< units::dimensionless::scalar_t > & GetDutyCycle ()
 The applied motor duty cycle. More...
 
StatusSignalValue< units::current::ampere_t > & GetTorqueCurrent ()
 Current corresponding to the torque output by the motor. More...
 
StatusSignalValue< units::current::ampere_t > & GetStatorCurrent ()
 Current corresponding to the stator windings. More...
 
StatusSignalValue< units::current::ampere_t > & GetSupplyCurrent ()
 Measured supply side current. More...
 
StatusSignalValue< units::voltage::volt_t > & GetSupplyVoltage ()
 Measured supply voltage to the TalonFX. More...
 
StatusSignalValue< units::temperature::celsius_t > & GetDeviceTemp ()
 Temperature of device. More...
 
StatusSignalValue< units::temperature::celsius_t > & GetProcessorTemp ()
 Temperature of the processor. More...
 
StatusSignalValue< units::angular_velocity::turns_per_second_t > & GetRotorVelocity ()
 Velocity of motor rotor. More...
 
StatusSignalValue< units::angle::turn_t > & GetRotorPosition ()
 Position of motor rotor. More...
 
StatusSignalValue< units::angular_velocity::turns_per_second_t > & GetVelocity ()
 Velocity of device. More...
 
StatusSignalValue< units::angle::turn_t > & GetPosition ()
 Position of device. More...
 
StatusSignalValue< signals::ControlModeValue > & GetControlMode ()
 The active control mode of the motor controller. More...
 
StatusSignalValue< signals::MotionMagicIsRunningValue > & GetMotionMagicIsRunning ()
 Check if Motion Magic® is running. More...
 
StatusSignalValue< signals::DeviceEnableValue > & GetDeviceEnable ()
 Indicates if device is actuator enabled. More...
 
StatusSignalValue< int > & GetClosedLoopSlot ()
 Closed loop slot in use. More...
 
StatusSignalValue< signals::BridgeOuputValue > & GetBridgeOuput ()
 The applied output of the bridge. More...
 
StatusSignalValue< bool > & GetFault_Hardware ()
 Hardware fault occurred. More...
 
StatusSignalValue< bool > & GetStickyFault_Hardware ()
 Hardware fault occurred. More...
 
StatusSignalValue< bool > & GetFault_ProcTemp ()
 Processor temperature exceeded limit. More...
 
StatusSignalValue< bool > & GetStickyFault_ProcTemp ()
 Processor temperature exceeded limit. More...
 
StatusSignalValue< bool > & GetFault_DeviceTemp ()
 Device temperature exceeded limit. More...
 
StatusSignalValue< bool > & GetStickyFault_DeviceTemp ()
 Device temperature exceeded limit. More...
 
StatusSignalValue< bool > & GetFault_Undervoltage ()
 Device supply voltage dropped to near brownout levels. More...
 
StatusSignalValue< bool > & GetStickyFault_Undervoltage ()
 Device supply voltage dropped to near brownout levels. More...
 
StatusSignalValue< bool > & GetFault_BootDuringEnable ()
 Device boot while detecting the enable signal. More...
 
StatusSignalValue< bool > & GetStickyFault_BootDuringEnable ()
 Device boot while detecting the enable signal. More...
 
StatusSignalValue< bool > & GetFault_OverSupplyV ()
 Supply Voltage has exceeded the maximum voltage rating of device. More...
 
StatusSignalValue< bool > & GetStickyFault_OverSupplyV ()
 Supply Voltage has exceeded the maximum voltage rating of device. More...
 
StatusSignalValue< bool > & GetFault_UnstableSupplyV ()
 Supply Voltage is unstable. More...
 
StatusSignalValue< bool > & GetStickyFault_UnstableSupplyV ()
 Supply Voltage is unstable. More...
 
StatusSignalValue< bool > & GetFault_ReverseHardLimit ()
 Reverse limit switch has been asserted. More...
 
StatusSignalValue< bool > & GetStickyFault_ReverseHardLimit ()
 Reverse limit switch has been asserted. More...
 
StatusSignalValue< bool > & GetFault_ForwardHardLimit ()
 Forward limit switch has been asserted. More...
 
StatusSignalValue< bool > & GetStickyFault_ForwardHardLimit ()
 Forward limit switch has been asserted. More...
 
StatusSignalValue< bool > & GetFault_ReverseSoftLimit ()
 Reverse soft limit has been asserted. More...
 
StatusSignalValue< bool > & GetStickyFault_ReverseSoftLimit ()
 Reverse soft limit has been asserted. More...
 
StatusSignalValue< bool > & GetFault_ForwardSoftLimit ()
 Forward soft limit has been asserted. More...
 
StatusSignalValue< bool > & GetStickyFault_ForwardSoftLimit ()
 Forward soft limit has been asserted. More...
 
StatusSignalValue< bool > & GetFault_MissingRemoteSensor ()
 The remote sensor is not present on CAN Bus. More...
 
StatusSignalValue< bool > & GetStickyFault_MissingRemoteSensor ()
 The remote sensor is not present on CAN Bus. More...
 
StatusSignalValue< bool > & GetFault_FusedSensorOutOfSync ()
 The remote sensor used for fusion has fallen out of sync to the local sensor. More...
 
StatusSignalValue< bool > & GetStickyFault_FusedSensorOutOfSync ()
 The remote sensor used for fusion has fallen out of sync to the local sensor. More...
 
StatusSignalValue< bool > & GetFault_StatorCurrLimit ()
 Stator current limit occured. More...
 
StatusSignalValue< bool > & GetStickyFault_StatorCurrLimit ()
 Stator current limit occured. More...
 
StatusSignalValue< bool > & GetFault_SupplyCurrLimit ()
 Supply current limit occured. More...
 
StatusSignalValue< bool > & GetStickyFault_SupplyCurrLimit ()
 Supply current limit occured. More...
 
StatusSignalValue< double > & GetClosedLoopProportionalOutput ()
 Closed loop proportional component. More...
 
StatusSignalValue< double > & GetClosedLoopIntegratedOutput ()
 Closed loop integrated component. More...
 
StatusSignalValue< double > & GetClosedLoopFeedForward ()
 Feed Forward passed by the user. More...
 
StatusSignalValue< double > & GetClosedLoopDerivativeOutput ()
 Closed loop derivative component. More...
 
StatusSignalValue< double > & GetClosedLoopOutput ()
 Closed loop total output. More...
 
StatusSignalValue< double > & GetClosedLoopReference ()
 Value that the closed loop is targeting. More...
 
StatusSignalValue< double > & GetClosedLoopReferenceSlope ()
 Derivative of the target that the closed loop is targeting. More...
 
StatusSignalValue< double > & GetClosedLoopError ()
 The difference between target reference and current measurement. More...
 
ctre::phoenix::StatusCode SetControl (controls::DutyCycleOut &request)
 Request a specified motor duty cycle. More...
 
ctre::phoenix::StatusCode SetControl (controls::DutyCycleOut &&request)
 Request a specified motor duty cycle. More...
 
ctre::phoenix::StatusCode SetControl (controls::TorqueCurrentFOC &request)
 Request a specified motor current (field oriented control). More...
 
ctre::phoenix::StatusCode SetControl (controls::TorqueCurrentFOC &&request)
 Request a specified motor current (field oriented control). More...
 
ctre::phoenix::StatusCode SetControl (controls::VoltageOut &request)
 Request a specified voltage. More...
 
ctre::phoenix::StatusCode SetControl (controls::VoltageOut &&request)
 Request a specified voltage. More...
 
ctre::phoenix::StatusCode SetControl (controls::PositionDutyCycle &request)
 Request PID to target position with duty cycle feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::PositionDutyCycle &&request)
 Request PID to target position with duty cycle feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::PositionVoltage &request)
 Request PID to target position with voltage feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::PositionVoltage &&request)
 Request PID to target position with voltage feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::PositionTorqueCurrentFOC &request)
 Request PID to target position with torque current feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::PositionTorqueCurrentFOC &&request)
 Request PID to target position with torque current feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::VelocityDutyCycle &request)
 Request PID to target velocity with duty cycle feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::VelocityDutyCycle &&request)
 Request PID to target velocity with duty cycle feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::VelocityVoltage &request)
 Request PID to target velocity with voltage feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::VelocityVoltage &&request)
 Request PID to target velocity with voltage feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::VelocityTorqueCurrentFOC &request)
 Request PID to target velocity with torque current feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::VelocityTorqueCurrentFOC &&request)
 Request PID to target velocity with torque current feedforward. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicDutyCycle &request)
 Requests Motion Magic® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicDutyCycle &&request)
 Requests Motion Magic® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVoltage &request)
 Requests Motion Magic® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVoltage &&request)
 Requests Motion Magic® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicTorqueCurrentFOC &request)
 Requests Motion Magic® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicTorqueCurrentFOC &&request)
 Requests Motion Magic® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::Follower &request)
 Follow the motor output of another Talon. More...
 
ctre::phoenix::StatusCode SetControl (controls::Follower &&request)
 Follow the motor output of another Talon. More...
 
ctre::phoenix::StatusCode SetControl (controls::StrictFollower &request)
 Follow the motor output of another Talon while ignoring the master's invert setting. More...
 
ctre::phoenix::StatusCode SetControl (controls::StrictFollower &&request)
 Follow the motor output of another Talon while ignoring the master's invert setting. More...
 
ctre::phoenix::StatusCode SetControl (controls::NeutralOut &request)
 Request neutral output of actuator. More...
 
ctre::phoenix::StatusCode SetControl (controls::NeutralOut &&request)
 Request neutral output of actuator. More...
 
ctre::phoenix::StatusCode SetControl (controls::CoastOut &request)
 Request coast neutral output of actuator. More...
 
ctre::phoenix::StatusCode SetControl (controls::CoastOut &&request)
 Request coast neutral output of actuator. More...
 
ctre::phoenix::StatusCode SetControl (controls::StaticBrake &request)
 Applies full neutral-brake by shorting motor leads together. More...
 
ctre::phoenix::StatusCode SetControl (controls::StaticBrake &&request)
 Applies full neutral-brake by shorting motor leads together. More...
 
ctre::phoenix::StatusCode SetControl (controls::ControlRequest &request)
 Control motor with generic control request object. More...
 
ctre::phoenix::StatusCode SetControl (controls::ControlRequest &&request)
 Control motor with generic control request object. More...
 
ctre::phoenix::StatusCode SetRotorPosition (units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
 The position to set the rotor position to right now. More...
 
ctre::phoenix::StatusCode SetRotorPosition (units::angle::turn_t newValue)
 The position to set the rotor position to right now. More...
 
ctre::phoenix::StatusCode ClearStickyFaults (units::time::second_t timeoutSeconds)
 Clear the sticky faults in the device. More...
 
ctre::phoenix::StatusCode ClearStickyFaults ()
 Clear the sticky faults in the device. More...
 
- Public Member Functions inherited from ctre::phoenixpro::hardware::ParentDevice
 ParentDevice (int deviceID, std::string model, std::string canbus)
 
int GetDeviceID () const
 
const std::string & GetCANBus () const
 
std::shared_ptr< const controls::ControlRequestGetAppliedControl () const
 Get the latest applied control. More...
 
std::shared_ptr< controls::ControlRequestGetAppliedControl ()
 Get the latest applied control. More...
 

Additional Inherited Members

- Static Public Attributes inherited from ctre::phoenixpro::hardware::ParentDevice
static constexpr double kDefaultControlRatePeriodsSec = 0.010
 
- Protected Member Functions inherited from ctre::phoenixpro::hardware::ParentDevice
virtual void ReportIfTooOld ()=0
 
virtual ctre::phoenix::StatusCode SetControlPrivate (controls::ControlRequest &request)
 
template<typename T >
StatusSignalValue< T > & LookupStatusSignalValue (uint16_t spn, std::string signalName, bool reportOnConstruction)
 
template<typename T >
StatusSignalValue< T > & LookupStatusSignalValue (uint16_t spn, uint16_t mapper_iter, std::function< std::map< int, StatusSignalValue< T > >()> map_filler, std::string signalName, bool reportOnConstruction)
 
template<typename T , typename U >
StatusSignalValue< T > LookupDimensionlessStatusSignalValue (uint16_t spn, std::string signalName)
 Returns a unitless version of the StatusSignalValue by value. More...
 
void ReportIfTooOld (int minMajor, int minMinor, int minBugfix, int minBuild)
 
- Protected Attributes inherited from ctre::phoenixpro::hardware::ParentDevice
DeviceIdentifier deviceIdentifier
 

Detailed Description

Class description for the Talon FX integrated motor controller that runs on associated Falcon motors.

Constructor & Destructor Documentation

◆ CoreTalonFX() [1/2]

ctre::phoenixpro::hardware::core::CoreTalonFX::CoreTalonFX ( int  deviceId,
std::string  canbus = "" 
)

Constructs a new Talon FX motor controller object.

Parameters
deviceIdID of the device, as configured in Phoenix Tuner.
canbusName of the CAN bus this device is on. Possible CAN bus strings are:
  • "rio" for the native roboRIO CAN bus
  • CANivore name or serial number
  • SocketCAN interface (non-FRC Linux only)
  • "*" for any CANivore seen by the program
  • empty string (default) to select the default for the system:
    • "rio" on roboRIO
    • "can0" on Linux
    • "*" on Windows

◆ CoreTalonFX() [2/2]

ctre::phoenixpro::hardware::core::CoreTalonFX::CoreTalonFX ( CoreTalonFX const &  )
delete

Member Function Documentation

◆ ClearStickyFaults() [1/2]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::ClearStickyFaults ( )
inline

Clear the sticky faults in the device.

This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.

This will wait up to 0.050 seconds (50ms) by default.

Returns
StatusCode of the set command

◆ ClearStickyFaults() [2/2]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::ClearStickyFaults ( units::time::second_t  timeoutSeconds)
inline

Clear the sticky faults in the device.

This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.

Parameters
timeoutSecondsMaximum time to wait up to in seconds.
Returns
StatusCode of the set command

◆ GetAppliedRotorPolarity()

StatusSignalValue< signals::AppliedRotorPolarityValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetAppliedRotorPolarity ( )

The applied rotor polarity.

This typically is determined by the Inverted config, but can be overridden if using Follower features.

Default Rates: CAN: 100.0 Hz

Returns
AppliedRotorPolarity Status Signal Value object

◆ GetBridgeOuput()

StatusSignalValue< signals::BridgeOuputValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetBridgeOuput ( )

The applied output of the bridge.

Default Rates: CAN: 100.0 Hz

Returns
BridgeOuput Status Signal Value object

◆ GetClosedLoopDerivativeOutput()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopDerivativeOutput ( )

Closed loop derivative component.

The portion of the closed loop output that is the proportional to the deriviative the error. Alternatively, the d-Contribution of the closed loop output.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopDerivativeOutput Status Signal Value object

◆ GetClosedLoopError()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopError ( )

The difference between target reference and current measurement.

This is the value that is treated as the error in the PID loop.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopError Status Signal Value object

◆ GetClosedLoopFeedForward()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopFeedForward ( )

Feed Forward passed by the user.

This is the general feed forward that the user provides for the closed loop.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopFeedForward Status Signal Value object

◆ GetClosedLoopIntegratedOutput()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopIntegratedOutput ( )

Closed loop integrated component.

The portion of the closed loop output that is proportional to the integrated error. Alternatively, the i-Contribution of the closed loop output.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopIntegratedOutput Status Signal Value object

◆ GetClosedLoopOutput()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopOutput ( )

Closed loop total output.

The total output of the closed loop output.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopOutput Status Signal Value object

◆ GetClosedLoopProportionalOutput()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopProportionalOutput ( )

Closed loop proportional component.

The portion of the closed loop output that is the proportional to the error. Alternatively, the p-Contribution of the closed loop output.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopProportionalOutput Status Signal Value object

◆ GetClosedLoopReference()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopReference ( )

Value that the closed loop is targeting.

This is the value that the closed loop PID controller targets.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopReference Status Signal Value object

◆ GetClosedLoopReferenceSlope()

StatusSignalValue< double > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopReferenceSlope ( )

Derivative of the target that the closed loop is targeting.

This is the change in the closed loop reference. This may be used in the feed-forward calculation, the derivative-error, or in application of the signage for kS. Typically, this represents the target velocity during Motion Magic®.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopReferenceSlope Status Signal Value object

◆ GetClosedLoopSlot()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetClosedLoopSlot ( )

Closed loop slot in use.

This is the slot that the closed loop PID is using.

Minimum Value: 0 Maximum Value: 2 Default Value: 0 Units:

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ClosedLoopSlot Status Signal Value object

◆ GetConfigurator() [1/2]

configs::TalonFXConfigurator & ctre::phoenixpro::hardware::core::CoreTalonFX::GetConfigurator ( )
inline

Gets the configurator for this TalonFX.

Gets the configurator for this TalonFX

Returns
Configurator for this TalonFX

◆ GetConfigurator() [2/2]

configs::TalonFXConfigurator const & ctre::phoenixpro::hardware::core::CoreTalonFX::GetConfigurator ( ) const
inline

Gets the configurator for this TalonFX.

Gets the configurator for this TalonFX

Returns
Configurator for this TalonFX

◆ GetControlMode()

StatusSignalValue< signals::ControlModeValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetControlMode ( )

The active control mode of the motor controller.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ControlMode Status Signal Value object

◆ GetDeviceEnable()

StatusSignalValue< signals::DeviceEnableValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetDeviceEnable ( )

Indicates if device is actuator enabled.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
DeviceEnable Status Signal Value object

◆ GetDeviceTemp()

StatusSignalValue< units::temperature::celsius_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetDeviceTemp ( )

Temperature of device.

This is the temperature that the device measures itself to be at. Similar to Processor Temperature.

Minimum Value: 0.0 Maximum Value: 255.0 Default Value: 0 Units: ℃

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
DeviceTemp Status Signal Value object

◆ GetDutyCycle()

StatusSignalValue< units::dimensionless::scalar_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetDutyCycle ( )

The applied motor duty cycle.

Minimum Value: -2.0 Maximum Value: 1.9990234375 Default Value: 0 Units: fractional

Default Rates: CAN: 100.0 Hz

Returns
DutyCycle Status Signal Value object

◆ GetFault_BootDuringEnable()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_BootDuringEnable ( )

Device boot while detecting the enable signal.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_BootDuringEnable Status Signal Value object

◆ GetFault_DeviceTemp()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_DeviceTemp ( )

Device temperature exceeded limit.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_DeviceTemp Status Signal Value object

◆ GetFault_ForwardHardLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_ForwardHardLimit ( )

Forward limit switch has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_ForwardHardLimit Status Signal Value object

◆ GetFault_ForwardSoftLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_ForwardSoftLimit ( )

Forward soft limit has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_ForwardSoftLimit Status Signal Value object

◆ GetFault_FusedSensorOutOfSync()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_FusedSensorOutOfSync ( )

The remote sensor used for fusion has fallen out of sync to the local sensor.

A re-synchronization has occurred, which may cause a discontinuity. This typically happens if there is significant slop in the mechanism, or if the RotorToSensorRatio configuration parameter is incorrect.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_FusedSensorOutOfSync Status Signal Value object

◆ GetFault_Hardware()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_Hardware ( )

Hardware fault occurred.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_Hardware Status Signal Value object

◆ GetFault_MissingRemoteSensor()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_MissingRemoteSensor ( )

The remote sensor is not present on CAN Bus.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_MissingRemoteSensor Status Signal Value object

◆ GetFault_OverSupplyV()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_OverSupplyV ( )

Supply Voltage has exceeded the maximum voltage rating of device.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_OverSupplyV Status Signal Value object

◆ GetFault_ProcTemp()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_ProcTemp ( )

Processor temperature exceeded limit.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_ProcTemp Status Signal Value object

◆ GetFault_ReverseHardLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_ReverseHardLimit ( )

Reverse limit switch has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_ReverseHardLimit Status Signal Value object

◆ GetFault_ReverseSoftLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_ReverseSoftLimit ( )

Reverse soft limit has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_ReverseSoftLimit Status Signal Value object

◆ GetFault_StatorCurrLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_StatorCurrLimit ( )

Stator current limit occured.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_StatorCurrLimit Status Signal Value object

◆ GetFault_SupplyCurrLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_SupplyCurrLimit ( )

Supply current limit occured.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_SupplyCurrLimit Status Signal Value object

◆ GetFault_Undervoltage()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_Undervoltage ( )

Device supply voltage dropped to near brownout levels.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_Undervoltage Status Signal Value object

◆ GetFault_UnstableSupplyV()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFault_UnstableSupplyV ( )

Supply Voltage is unstable.

Ensure you are using a battery and current limited power supply.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
Fault_UnstableSupplyV Status Signal Value object

◆ GetFaultField()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetFaultField ( )

Integer representing all faults.

This returns the fault flags reported by the device. These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.

Minimum Value: 0 Maximum Value: 1048575 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
FaultField Status Signal Value object

◆ GetForwardLimit()

StatusSignalValue< signals::ForwardLimitValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetForwardLimit ( )

Forward Limit Pin.

Default Rates: CAN: 100.0 Hz

Returns
ForwardLimit Status Signal Value object

◆ GetMotionMagicIsRunning()

StatusSignalValue< signals::MotionMagicIsRunningValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetMotionMagicIsRunning ( )

Check if Motion Magic® is running.

This is equivalent to checking that the reported control mode is a Motion Magic® based mode.

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
MotionMagicIsRunning Status Signal Value object

◆ GetPosition()

StatusSignalValue< units::angle::turn_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetPosition ( )

Position of device.

Minimum Value: -16384.0 Maximum Value: 16383.999755859375 Default Value: 0 Units: rotations

Default Rates: CAN 2.0: 50.0 Hz CAN FD: 100.0 Hz

Returns
Position Status Signal Value object

◆ GetProcessorTemp()

StatusSignalValue< units::temperature::celsius_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetProcessorTemp ( )

Temperature of the processor.

This is the temperature that the processor measures itself to be at. Similar to Device Temperature.

Minimum Value: 0.0 Maximum Value: 255.0 Default Value: 0 Units: ℃

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
ProcessorTemp Status Signal Value object

◆ GetReverseLimit()

StatusSignalValue< signals::ReverseLimitValue > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetReverseLimit ( )

Reverse Limit Pin.

Default Rates: CAN: 100.0 Hz

Returns
ReverseLimit Status Signal Value object

◆ GetRotorPosition()

StatusSignalValue< units::angle::turn_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetRotorPosition ( )

Position of motor rotor.

Minimum Value: -16384.0 Maximum Value: 16383.999755859375 Default Value: 0 Units: rotations

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
RotorPosition Status Signal Value object

◆ GetRotorVelocity()

StatusSignalValue< units::angular_velocity::turns_per_second_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetRotorVelocity ( )

Velocity of motor rotor.

Minimum Value: -512.0 Maximum Value: 511.998046875 Default Value: 0 Units: rotations per second

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
RotorVelocity Status Signal Value object

◆ GetSimState()

sim::TalonFXSimState & ctre::phoenixpro::hardware::core::CoreTalonFX::GetSimState ( )
inline

Get the simulation state for this device.

This function reuses an allocated simulation state object, so it is safe to call this function multiple times in a robot loop.

Returns
Simulation state

◆ GetStatorCurrent()

StatusSignalValue< units::current::ampere_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStatorCurrent ( )

Current corresponding to the stator windings.

Similar to TorqueCurrent. Users will likely prefer TorqueCurrent over StatorCurrent.

Stator current where Positive current indicates motoring regardless of direction. Negative current indicates regenerative braking regardless of direction.

Minimum Value: -327.68 Maximum Value: 327.67 Default Value: 0 Units: A

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
StatorCurrent Status Signal Value object

◆ GetStickyFault_BootDuringEnable()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_BootDuringEnable ( )

Device boot while detecting the enable signal.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_BootDuringEnable Status Signal Value object

◆ GetStickyFault_DeviceTemp()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_DeviceTemp ( )

Device temperature exceeded limit.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_DeviceTemp Status Signal Value object

◆ GetStickyFault_ForwardHardLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_ForwardHardLimit ( )

Forward limit switch has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_ForwardHardLimit Status Signal Value object

◆ GetStickyFault_ForwardSoftLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_ForwardSoftLimit ( )

Forward soft limit has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_ForwardSoftLimit Status Signal Value object

◆ GetStickyFault_FusedSensorOutOfSync()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_FusedSensorOutOfSync ( )

The remote sensor used for fusion has fallen out of sync to the local sensor.

A re-synchronization has occurred, which may cause a discontinuity. This typically happens if there is significant slop in the mechanism, or if the RotorToSensorRatio configuration parameter is incorrect.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_FusedSensorOutOfSync Status Signal Value object

◆ GetStickyFault_Hardware()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_Hardware ( )

Hardware fault occurred.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_Hardware Status Signal Value object

◆ GetStickyFault_MissingRemoteSensor()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_MissingRemoteSensor ( )

The remote sensor is not present on CAN Bus.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_MissingRemoteSensor Status Signal Value object

◆ GetStickyFault_OverSupplyV()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_OverSupplyV ( )

Supply Voltage has exceeded the maximum voltage rating of device.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_OverSupplyV Status Signal Value object

◆ GetStickyFault_ProcTemp()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_ProcTemp ( )

Processor temperature exceeded limit.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_ProcTemp Status Signal Value object

◆ GetStickyFault_ReverseHardLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_ReverseHardLimit ( )

Reverse limit switch has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_ReverseHardLimit Status Signal Value object

◆ GetStickyFault_ReverseSoftLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_ReverseSoftLimit ( )

Reverse soft limit has been asserted.

Output is set to neutral.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_ReverseSoftLimit Status Signal Value object

◆ GetStickyFault_StatorCurrLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_StatorCurrLimit ( )

Stator current limit occured.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_StatorCurrLimit Status Signal Value object

◆ GetStickyFault_SupplyCurrLimit()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_SupplyCurrLimit ( )

Supply current limit occured.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_SupplyCurrLimit Status Signal Value object

◆ GetStickyFault_Undervoltage()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_Undervoltage ( )

Device supply voltage dropped to near brownout levels.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_Undervoltage Status Signal Value object

◆ GetStickyFault_UnstableSupplyV()

StatusSignalValue< bool > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFault_UnstableSupplyV ( )

Supply Voltage is unstable.

Ensure you are using a battery and current limited power supply.

Default Value: False

Default Rates: CAN: 4.0 Hz

Returns
StickyFault_UnstableSupplyV Status Signal Value object

◆ GetStickyFaultField()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetStickyFaultField ( )

Integer representing all sticky faults.

This returns the persistent "sticky" fault flags reported by the device. These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.

Minimum Value: 0 Maximum Value: 1048575 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
StickyFaultField Status Signal Value object

◆ GetSupplyCurrent()

StatusSignalValue< units::current::ampere_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetSupplyCurrent ( )

Measured supply side current.

Minimum Value: -327.68 Maximum Value: 327.67 Default Value: 0 Units: A

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
SupplyCurrent Status Signal Value object

◆ GetSupplyVoltage()

StatusSignalValue< units::voltage::volt_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetSupplyVoltage ( )

Measured supply voltage to the TalonFX.

Minimum Value: 4.0 Maximum Value: 16.75 Default Value: 4 Units: V

Default Rates: CAN 2.0: 5.0 Hz CAN FD: 100.0 Hz

Returns
SupplyVoltage Status Signal Value object

◆ GetTorqueCurrent()

StatusSignalValue< units::current::ampere_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetTorqueCurrent ( )

Current corresponding to the torque output by the motor.

Similar to StatorCurrent. Users will likely prefer this current to calculate the applied torque to the rotor.

Stator current where positive current means torque is applied in the forward direction as determined by the Inverted setting

Minimum Value: -327.68 Maximum Value: 327.67 Default Value: 0 Units: A

Default Rates: CAN: 100.0 Hz

Returns
TorqueCurrent Status Signal Value object

◆ GetVelocity()

StatusSignalValue< units::angular_velocity::turns_per_second_t > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetVelocity ( )

Velocity of device.

Minimum Value: -512.0 Maximum Value: 511.998046875 Default Value: 0 Units: rotations per second

Default Rates: CAN 2.0: 50.0 Hz CAN FD: 100.0 Hz

Returns
Velocity Status Signal Value object

◆ GetVersion()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetVersion ( )

Full Version.

The format is a four byte value.

Full Version of firmware in device. The format is a four byte value.

Minimum Value: 0 Maximum Value: 4294967295 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
Version Status Signal Value object

◆ GetVersionBugfix()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetVersionBugfix ( )

App Bugfix Version number.

Minimum Value: 0 Maximum Value: 255 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
VersionBugfix Status Signal Value object

◆ GetVersionBuild()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetVersionBuild ( )

App Build Version number.

Minimum Value: 0 Maximum Value: 255 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
VersionBuild Status Signal Value object

◆ GetVersionMajor()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetVersionMajor ( )

App Major Version number.

Minimum Value: 0 Maximum Value: 255 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
VersionMajor Status Signal Value object

◆ GetVersionMinor()

StatusSignalValue< int > & ctre::phoenixpro::hardware::core::CoreTalonFX::GetVersionMinor ( )

App Minor Version number.

Minimum Value: 0 Maximum Value: 255 Default Value: 0 Units:

Default Rates: CAN: 4.0 Hz

Returns
VersionMinor Status Signal Value object

◆ HasResetOccurred()

bool ctre::phoenixpro::hardware::core::CoreTalonFX::HasResetOccurred ( )
Returns
true if device has reset since the previous call of this routine.

◆ operator=()

CoreTalonFX & ctre::phoenixpro::hardware::core::CoreTalonFX::operator= ( CoreTalonFX const &  )
delete

◆ SetControl() [1/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::CoastOut &&  request)
inline

Request coast neutral output of actuator.

The bridge is disabled and the rotor is allowed to coast.

CoastOut Parameters:

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [2/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::CoastOut request)

Request coast neutral output of actuator.

The bridge is disabled and the rotor is allowed to coast.

CoastOut Parameters:

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [3/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::ControlRequest &&  request)
inline

Control motor with generic control request object.

User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the corresponding StatusCode

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [4/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::ControlRequest request)
inline

Control motor with generic control request object.

User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the NotSupported StatusCode

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [5/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::DutyCycleOut &&  request)
inline

Request a specified motor duty cycle.

This control mode will output a proportion of the supplied voltage which is supplied by the user.

DutyCycleOut Parameters: Output: Proportion of supply voltage to apply in fractional units between -1 and +1 EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [6/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::DutyCycleOut request)

Request a specified motor duty cycle.

This control mode will output a proportion of the supplied voltage which is supplied by the user.

DutyCycleOut Parameters: Output: Proportion of supply voltage to apply in fractional units between -1 and +1 EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [7/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::Follower &&  request)
inline

Follow the motor output of another Talon.

If Talon is in torque control, the torque is copied - which will increase the total torque applied. If Talon is in percent supply output control, the duty cycle is matched. Motor direction either matches master's configured direction or opposes it based on OpposeMasterDirection.

Follower Parameters: MasterID: Device ID of the master to follow. OpposeMasterDirection: Set to false for motor invert to match the master's configured Invert - which is typical when master and follower are mechanically linked and spin in the same direction. Set to true for motor invert to oppose the master's configured Invert - this is typical where the the master and follower mechanically spin in opposite directions.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [8/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::Follower request)

Follow the motor output of another Talon.

If Talon is in torque control, the torque is copied - which will increase the total torque applied. If Talon is in percent supply output control, the duty cycle is matched. Motor direction either matches master's configured direction or opposes it based on OpposeMasterDirection.

Follower Parameters: MasterID: Device ID of the master to follow. OpposeMasterDirection: Set to false for motor invert to match the master's configured Invert - which is typical when master and follower are mechanically linked and spin in the same direction. Set to true for motor invert to oppose the master's configured Invert - this is typical where the the master and follower mechanically spin in opposite directions.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [9/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::MotionMagicDutyCycle &&  request)
inline

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a duty cycle feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycled based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

MotionMagicDutyCycle Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in fractional units between -1 and +1. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [10/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::MotionMagicDutyCycle request)

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a duty cycle feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycled based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

MotionMagicDutyCycle Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in fractional units between -1 and +1. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [11/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::MotionMagicTorqueCurrentFOC &&  request)
inline

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a torque current feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.

MotionMagicTorqueCurrentFOC Parameters: Position: Position to drive toward in rotations. FeedForward: Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [12/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::MotionMagicTorqueCurrentFOC request)

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a torque current feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.

MotionMagicTorqueCurrentFOC Parameters: Position: Position to drive toward in rotations. FeedForward: Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [13/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::MotionMagicVoltage &&  request)
inline

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a voltage feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

MotionMagicVoltage Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in volts Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [14/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::MotionMagicVoltage request)

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a voltage feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

MotionMagicVoltage Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in volts Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [15/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::NeutralOut &&  request)
inline

Request neutral output of actuator.

The applied brake type is determined by the NeutralMode configuration.

NeutralOut Parameters:

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [16/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::NeutralOut request)

Request neutral output of actuator.

The applied brake type is determined by the NeutralMode configuration.

NeutralOut Parameters:

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [17/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::PositionDutyCycle &&  request)
inline

Request PID to target position with duty cycle feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional duty cycle as an arbitrary feedforward value.

PositionDutyCycle Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in fractional units between -1 and +1. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [18/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::PositionDutyCycle request)

Request PID to target position with duty cycle feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional duty cycle as an arbitrary feedforward value.

PositionDutyCycle Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in fractional units between -1 and +1. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [19/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::PositionTorqueCurrentFOC &&  request)
inline

Request PID to target position with torque current feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional torque current as an arbitrary feedforward value.

PositionTorqueCurrentFOC Parameters: Position: Position to drive toward in rotations. FeedForward: Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [20/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::PositionTorqueCurrentFOC request)

Request PID to target position with torque current feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional torque current as an arbitrary feedforward value.

PositionTorqueCurrentFOC Parameters: Position: Position to drive toward in rotations. FeedForward: Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [21/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::PositionVoltage &&  request)
inline

Request PID to target position with voltage feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

PositionVoltage Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in volts Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [22/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::PositionVoltage request)

Request PID to target position with voltage feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

PositionVoltage Parameters: Position: Position to drive toward in rotations. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in volts Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [23/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::StaticBrake &&  request)
inline

Applies full neutral-brake by shorting motor leads together.

StaticBrake Parameters:

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [24/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::StaticBrake request)

Applies full neutral-brake by shorting motor leads together.

StaticBrake Parameters:

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [25/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::StrictFollower &&  request)
inline

Follow the motor output of another Talon while ignoring the master's invert setting.

If Talon is in torque control, the torque is copied - which will increase the total torque applied. If Talon is in percent supply output control, the duty cycle is matched. Motor direction is strictly determined by the configured invert and not the master. If you want motor direction to match or oppose the master, use FollowerRequest instead.

StrictFollower Parameters: MasterID: Device ID of the master to follow.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [26/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::StrictFollower request)

Follow the motor output of another Talon while ignoring the master's invert setting.

If Talon is in torque control, the torque is copied - which will increase the total torque applied. If Talon is in percent supply output control, the duty cycle is matched. Motor direction is strictly determined by the configured invert and not the master. If you want motor direction to match or oppose the master, use FollowerRequest instead.

StrictFollower Parameters: MasterID: Device ID of the master to follow.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [27/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::TorqueCurrentFOC &&  request)
inline

Request a specified motor current (field oriented control).

This control request will drive the motor to the requested motor (stator) current value. This leverages field oriented control (FOC), which means greater peak power than what is documented. This scales to torque based on Motor's kT constant.

TorqueCurrentFOC Parameters: Output: Amount of motor current in Amperes MaxAbsDutyCycle: The maximum absolute motor output that can be applied, which effectively limits the velocity. For example, 0.50 means no more than 50% output in either direction. This is useful for preventing the motor from spinning to its terminal velocity when there is no external torque applied unto the rotor. Note this is absolute maximum, so the value should be between zero and one. Deadband: Deadband in Amperes. If torque request is within deadband, the bridge output is neutral. If deadband is set to zero then there is effectively no deadband. Note if deadband is zero, a free spinning motor will spin for quite a while as the firmware attempts to hold the motor's bemf. If user expects motor to cease spinning quickly with a demand of zero, we recommend a deadband of one Ampere. This value will be converted to an integral value of amps. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [28/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::TorqueCurrentFOC request)

Request a specified motor current (field oriented control).

This control request will drive the motor to the requested motor (stator) current value. This leverages field oriented control (FOC), which means greater peak power than what is documented. This scales to torque based on Motor's kT constant.

TorqueCurrentFOC Parameters: Output: Amount of motor current in Amperes MaxAbsDutyCycle: The maximum absolute motor output that can be applied, which effectively limits the velocity. For example, 0.50 means no more than 50% output in either direction. This is useful for preventing the motor from spinning to its terminal velocity when there is no external torque applied unto the rotor. Note this is absolute maximum, so the value should be between zero and one. Deadband: Deadband in Amperes. If torque request is within deadband, the bridge output is neutral. If deadband is set to zero then there is effectively no deadband. Note if deadband is zero, a free spinning motor will spin for quite a while as the firmware attempts to hold the motor's bemf. If user expects motor to cease spinning quickly with a demand of zero, we recommend a deadband of one Ampere. This value will be converted to an integral value of amps. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [29/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VelocityDutyCycle &&  request)
inline

Request PID to target velocity with duty cycle feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

VelocityDutyCycle Parameters: Velocity: Velocity to drive toward in rotations per second. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in fractional units between -1 and +1. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [30/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VelocityDutyCycle request)

Request PID to target velocity with duty cycle feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

VelocityDutyCycle Parameters: Velocity: Velocity to drive toward in rotations per second. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in fractional units between -1 and +1. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [31/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VelocityTorqueCurrentFOC &&  request)
inline

Request PID to target velocity with torque current feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional torque current as an arbitrary feedforward value.

VelocityTorqueCurrentFOC Parameters: Velocity: Velocity to drive toward in rotations per second. FeedForward: Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [32/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VelocityTorqueCurrentFOC request)

Request PID to target velocity with torque current feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional torque current as an arbitrary feedforward value.

VelocityTorqueCurrentFOC Parameters: Velocity: Velocity to drive toward in rotations per second. FeedForward: Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes. Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideCoastDurNeutral: Set to true to coast the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0A (zero torque).

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [33/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VelocityVoltage &&  request)
inline

Request PID to target velocity with voltage feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

VelocityVoltage Parameters: Velocity: Velocity to drive toward in rotations per second. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in volts Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [34/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VelocityVoltage request)

Request PID to target velocity with voltage feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

VelocityVoltage Parameters: Velocity: Velocity to drive toward in rotations per second. EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. FeedForward: Feedforward to apply in volts Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2]. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [35/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VoltageOut &&  request)
inline

Request a specified voltage.

This control mode will attempt to apply the specified voltage to the motor. If the supply voltage is below the requested voltage, the motor controller will output the supply voltage.

VoltageOut Parameters: Output: Voltage to attempt to drive at EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetControl() [36/36]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetControl ( controls::VoltageOut request)

Request a specified voltage.

This control mode will attempt to apply the specified voltage to the motor. If the supply voltage is below the requested voltage, the motor controller will output the supply voltage.

VoltageOut Parameters: Output: Voltage to attempt to drive at EnableFOC: Set to true to use FOC commutation, which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains. OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

◆ SetRotorPosition() [1/2]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetRotorPosition ( units::angle::turn_t  newValue)
inline

The position to set the rotor position to right now.

This will wait up to 0.050 seconds (50ms) by default.

Parameters
newValueValue to set to.
Returns
StatusCode of the set command

◆ SetRotorPosition() [2/2]

ctre::phoenix::StatusCode ctre::phoenixpro::hardware::core::CoreTalonFX::SetRotorPosition ( units::angle::turn_t  newValue,
units::time::second_t  timeoutSeconds 
)
inline

The position to set the rotor position to right now.

Parameters
newValueValue to set to.
timeoutSecondsMaximum time to wait up to in seconds.
Returns
StatusCode of the set command

The documentation for this class was generated from the following file: