CTRE Phoenix 6 C++ 24.50.0-alpha-2
ctre::phoenix6::hardware::TalonFX Class Reference

Class description for the Talon FX integrated motor controller. More...

#include <ctre/phoenix6/TalonFX.hpp>

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

Public Member Functions

 TalonFX (int deviceId, std::string canbus="")
 Constructs a new Talon FX motor controller object. More...
 
 TalonFX (int deviceId, CANBus canbus)
 Constructs a new Talon FX motor controller object. More...
 
 ~TalonFX ()
 
void Set (double speed) override
 Common interface for setting the speed of a motor controller. More...
 
void SetVoltage (units::volt_t volts) override
 Common interface for seting the direct voltage output of a motor controller. More...
 
double Get () const override
 Common interface for getting the current set speed of a motor controller. More...
 
void Disable () override
 Common interface for disabling a motor controller. More...
 
void StopMotor () override
 Common interface to stop motor movement until Set is called again. More...
 
void SetInverted (bool isInverted) override
 Common interface for inverting direction of a motor controller. More...
 
bool GetInverted () const override
 Common interface for returning the inversion state of a motor controller. More...
 
ctre::phoenix::StatusCode SetNeutralMode (signals::NeutralModeValue neutralMode, units::second_t timeoutSeconds=100_ms)
 Sets the mode of operation when output is neutral or disabled. More...
 
std::string GetDescription () const
 
void InitSendable (wpi::SendableBuilder &builder) override
 
void Feed ()
 Feed the motor safety object. More...
 
void SetExpiration (units::second_t expirationTime)
 Set the expiration time for the corresponding motor safety object. More...
 
units::second_t GetExpiration () const
 Retrieve the timeout value for the corresponding motor safety object. More...
 
bool IsAlive () const
 Determine of the motor is still operating or has timed out. More...
 
void SetSafetyEnabled (bool enabled)
 Enable/disable motor safety for this device. More...
 
bool IsSafetyEnabled () const
 Return the state of the motor safety enabled flag. More...
 
- Public Member Functions inherited from ctre::phoenix6::hardware::core::CoreTalonFX
 CoreTalonFX (int deviceId, std::string canbus="")
 Constructs a new Talon FX motor controller object. More...
 
 CoreTalonFX (int deviceId, CANBus canbus)
 Constructs a new Talon FX motor controller object. More...
 
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...
 
StatusSignal< int > & GetVersionMajor (bool refresh=true)
 App Major Version number. More...
 
StatusSignal< int > & GetVersionMinor (bool refresh=true)
 App Minor Version number. More...
 
StatusSignal< int > & GetVersionBugfix (bool refresh=true)
 App Bugfix Version number. More...
 
StatusSignal< int > & GetVersionBuild (bool refresh=true)
 App Build Version number. More...
 
StatusSignal< int > & GetVersion (bool refresh=true)
 Full Version. More...
 
StatusSignal< int > & GetFaultField (bool refresh=true)
 Integer representing all faults. More...
 
StatusSignal< int > & GetStickyFaultField (bool refresh=true)
 Integer representing all sticky faults. More...
 
StatusSignal< units::voltage::volt_t > & GetMotorVoltage (bool refresh=true)
 The applied (output) motor voltage. More...
 
StatusSignal< signals::ForwardLimitValue > & GetForwardLimit (bool refresh=true)
 Forward Limit Pin. More...
 
StatusSignal< signals::ReverseLimitValue > & GetReverseLimit (bool refresh=true)
 Reverse Limit Pin. More...
 
StatusSignal< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity (bool refresh=true)
 The applied rotor polarity as seen from the front of the motor. More...
 
StatusSignal< units::dimensionless::scalar_t > & GetDutyCycle (bool refresh=true)
 The applied motor duty cycle. More...
 
StatusSignal< units::current::ampere_t > & GetTorqueCurrent (bool refresh=true)
 Current corresponding to the torque output by the motor. More...
 
StatusSignal< units::current::ampere_t > & GetStatorCurrent (bool refresh=true)
 Current corresponding to the stator windings. More...
 
StatusSignal< units::current::ampere_t > & GetSupplyCurrent (bool refresh=true)
 Measured supply side current. More...
 
StatusSignal< units::voltage::volt_t > & GetSupplyVoltage (bool refresh=true)
 Measured supply voltage to the TalonFX. More...
 
StatusSignal< units::temperature::celsius_t > & GetDeviceTemp (bool refresh=true)
 Temperature of device. More...
 
StatusSignal< units::temperature::celsius_t > & GetProcessorTemp (bool refresh=true)
 Temperature of the processor. More...
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetRotorVelocity (bool refresh=true)
 Velocity of the motor rotor. More...
 
StatusSignal< units::angle::turn_t > & GetRotorPosition (bool refresh=true)
 Position of the motor rotor. More...
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetVelocity (bool refresh=true)
 Velocity of the device in mechanism rotations per second. More...
 
StatusSignal< units::angle::turn_t > & GetPosition (bool refresh=true)
 Position of the device in mechanism rotations. More...
 
StatusSignal< units::angular_acceleration::turns_per_second_squared_t > & GetAcceleration (bool refresh=true)
 Acceleration of the device in mechanism rotations per second². More...
 
StatusSignal< signals::ControlModeValue > & GetControlMode (bool refresh=true)
 The active control mode of the motor controller. More...
 
StatusSignal< signals::MotionMagicIsRunningValue > & GetMotionMagicIsRunning (bool refresh=true)
 Check if Motion MagicĀ® is running. More...
 
StatusSignal< signals::DeviceEnableValue > & GetDeviceEnable (bool refresh=true)
 Indicates if device is actuator enabled. More...
 
StatusSignal< int > & GetClosedLoopSlot (bool refresh=true)
 Closed loop slot in use. More...
 
StatusSignal< signals::DifferentialControlModeValue > & GetDifferentialControlMode (bool refresh=true)
 The active control mode of the differential controller. More...
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialAverageVelocity (bool refresh=true)
 Average component of the differential velocity of device. More...
 
StatusSignal< units::angle::turn_t > & GetDifferentialAveragePosition (bool refresh=true)
 Average component of the differential position of device. More...
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialDifferenceVelocity (bool refresh=true)
 Difference component of the differential velocity of device. More...
 
StatusSignal< units::angle::turn_t > & GetDifferentialDifferencePosition (bool refresh=true)
 Difference component of the differential position of device. More...
 
StatusSignal< int > & GetDifferentialClosedLoopSlot (bool refresh=true)
 Differential Closed loop slot in use. More...
 
StatusSignal< signals::BridgeOutputValue > & GetBridgeOutput (bool refresh=true)
 The applied output of the bridge. More...
 
StatusSignal< bool > & GetIsProLicensed (bool refresh=true)
 Whether the device is Phoenix Pro licensed. More...
 
StatusSignal< units::temperature::celsius_t > & GetAncillaryDeviceTemp (bool refresh=true)
 Temperature of device from second sensor. More...
 
StatusSignal< signals::MotorTypeValue > & GetMotorType (bool refresh=true)
 The type of motor attached to the Talon FX. More...
 
StatusSignal< signals::MotorOutputStatusValue > & GetMotorOutputStatus (bool refresh=true)
 Assess the status of the motor output with respect to load and supply. More...
 
StatusSignal< bool > & GetFault_Hardware (bool refresh=true)
 Hardware fault occurred. More...
 
StatusSignal< bool > & GetStickyFault_Hardware (bool refresh=true)
 Hardware fault occurred. More...
 
StatusSignal< bool > & GetFault_ProcTemp (bool refresh=true)
 Processor temperature exceeded limit. More...
 
StatusSignal< bool > & GetStickyFault_ProcTemp (bool refresh=true)
 Processor temperature exceeded limit. More...
 
StatusSignal< bool > & GetFault_DeviceTemp (bool refresh=true)
 Device temperature exceeded limit. More...
 
StatusSignal< bool > & GetStickyFault_DeviceTemp (bool refresh=true)
 Device temperature exceeded limit. More...
 
StatusSignal< bool > & GetFault_Undervoltage (bool refresh=true)
 Device supply voltage dropped to near brownout levels. More...
 
StatusSignal< bool > & GetStickyFault_Undervoltage (bool refresh=true)
 Device supply voltage dropped to near brownout levels. More...
 
StatusSignal< bool > & GetFault_BootDuringEnable (bool refresh=true)
 Device boot while detecting the enable signal. More...
 
StatusSignal< bool > & GetStickyFault_BootDuringEnable (bool refresh=true)
 Device boot while detecting the enable signal. More...
 
StatusSignal< bool > & GetFault_UnlicensedFeatureInUse (bool refresh=true)
 An unlicensed feature is in use, device may not behave as expected. More...
 
StatusSignal< bool > & GetStickyFault_UnlicensedFeatureInUse (bool refresh=true)
 An unlicensed feature is in use, device may not behave as expected. More...
 
StatusSignal< bool > & GetFault_BridgeBrownout (bool refresh=true)
 Bridge was disabled most likely due to supply voltage dropping too low. More...
 
StatusSignal< bool > & GetStickyFault_BridgeBrownout (bool refresh=true)
 Bridge was disabled most likely due to supply voltage dropping too low. More...
 
StatusSignal< bool > & GetFault_RemoteSensorReset (bool refresh=true)
 The remote sensor has reset. More...
 
StatusSignal< bool > & GetStickyFault_RemoteSensorReset (bool refresh=true)
 The remote sensor has reset. More...
 
StatusSignal< bool > & GetFault_MissingDifferentialFX (bool refresh=true)
 The remote Talon FX used for differential control is not present on CAN Bus. More...
 
StatusSignal< bool > & GetStickyFault_MissingDifferentialFX (bool refresh=true)
 The remote Talon FX used for differential control is not present on CAN Bus. More...
 
StatusSignal< bool > & GetFault_RemoteSensorPosOverflow (bool refresh=true)
 The remote sensor position has overflowed. More...
 
StatusSignal< bool > & GetStickyFault_RemoteSensorPosOverflow (bool refresh=true)
 The remote sensor position has overflowed. More...
 
StatusSignal< bool > & GetFault_OverSupplyV (bool refresh=true)
 Supply Voltage has exceeded the maximum voltage rating of device. More...
 
StatusSignal< bool > & GetStickyFault_OverSupplyV (bool refresh=true)
 Supply Voltage has exceeded the maximum voltage rating of device. More...
 
StatusSignal< bool > & GetFault_UnstableSupplyV (bool refresh=true)
 Supply Voltage is unstable. More...
 
StatusSignal< bool > & GetStickyFault_UnstableSupplyV (bool refresh=true)
 Supply Voltage is unstable. More...
 
StatusSignal< bool > & GetFault_ReverseHardLimit (bool refresh=true)
 Reverse limit switch has been asserted. More...
 
StatusSignal< bool > & GetStickyFault_ReverseHardLimit (bool refresh=true)
 Reverse limit switch has been asserted. More...
 
StatusSignal< bool > & GetFault_ForwardHardLimit (bool refresh=true)
 Forward limit switch has been asserted. More...
 
StatusSignal< bool > & GetStickyFault_ForwardHardLimit (bool refresh=true)
 Forward limit switch has been asserted. More...
 
StatusSignal< bool > & GetFault_ReverseSoftLimit (bool refresh=true)
 Reverse soft limit has been asserted. More...
 
StatusSignal< bool > & GetStickyFault_ReverseSoftLimit (bool refresh=true)
 Reverse soft limit has been asserted. More...
 
StatusSignal< bool > & GetFault_ForwardSoftLimit (bool refresh=true)
 Forward soft limit has been asserted. More...
 
StatusSignal< bool > & GetStickyFault_ForwardSoftLimit (bool refresh=true)
 Forward soft limit has been asserted. More...
 
StatusSignal< bool > & GetFault_MissingSoftLimitRemote (bool refresh=true)
 The remote soft limit device is not present on CAN Bus. More...
 
StatusSignal< bool > & GetStickyFault_MissingSoftLimitRemote (bool refresh=true)
 The remote soft limit device is not present on CAN Bus. More...
 
StatusSignal< bool > & GetFault_MissingHardLimitRemote (bool refresh=true)
 The remote limit switch device is not present on CAN Bus. More...
 
StatusSignal< bool > & GetStickyFault_MissingHardLimitRemote (bool refresh=true)
 The remote limit switch device is not present on CAN Bus. More...
 
StatusSignal< bool > & GetFault_RemoteSensorDataInvalid (bool refresh=true)
 The remote sensor's data is no longer trusted. More...
 
StatusSignal< bool > & GetStickyFault_RemoteSensorDataInvalid (bool refresh=true)
 The remote sensor's data is no longer trusted. More...
 
StatusSignal< bool > & GetFault_FusedSensorOutOfSync (bool refresh=true)
 The remote sensor used for fusion has fallen out of sync to the local sensor. More...
 
StatusSignal< bool > & GetStickyFault_FusedSensorOutOfSync (bool refresh=true)
 The remote sensor used for fusion has fallen out of sync to the local sensor. More...
 
StatusSignal< bool > & GetFault_StatorCurrLimit (bool refresh=true)
 Stator current limit occured. More...
 
StatusSignal< bool > & GetStickyFault_StatorCurrLimit (bool refresh=true)
 Stator current limit occured. More...
 
StatusSignal< bool > & GetFault_SupplyCurrLimit (bool refresh=true)
 Supply current limit occured. More...
 
StatusSignal< bool > & GetStickyFault_SupplyCurrLimit (bool refresh=true)
 Supply current limit occured. More...
 
StatusSignal< bool > & GetFault_UsingFusedCANcoderWhileUnlicensed (bool refresh=true)
 Using Fused CANcoder feature while unlicensed. More...
 
StatusSignal< bool > & GetStickyFault_UsingFusedCANcoderWhileUnlicensed (bool refresh=true)
 Using Fused CANcoder feature while unlicensed. More...
 
StatusSignal< bool > & GetFault_StaticBrakeDisabled (bool refresh=true)
 Static brake was momentarily disabled due to excessive braking current while disabled. More...
 
StatusSignal< bool > & GetStickyFault_StaticBrakeDisabled (bool refresh=true)
 Static brake was momentarily disabled due to excessive braking current while disabled. More...
 
StatusSignal< double > & GetClosedLoopProportionalOutput (bool refresh=true)
 Closed loop proportional component. More...
 
StatusSignal< double > & GetClosedLoopIntegratedOutput (bool refresh=true)
 Closed loop integrated component. More...
 
StatusSignal< double > & GetClosedLoopFeedForward (bool refresh=true)
 Feedforward passed by the user. More...
 
StatusSignal< double > & GetClosedLoopDerivativeOutput (bool refresh=true)
 Closed loop derivative component. More...
 
StatusSignal< double > & GetClosedLoopOutput (bool refresh=true)
 Closed loop total output. More...
 
StatusSignal< double > & GetClosedLoopReference (bool refresh=true)
 Value that the closed loop is targeting. More...
 
StatusSignal< double > & GetClosedLoopReferenceSlope (bool refresh=true)
 Derivative of the target that the closed loop is targeting. More...
 
StatusSignal< double > & GetClosedLoopError (bool refresh=true)
 The difference between target reference and current measurement. More...
 
StatusSignal< double > & GetDifferentialOutput (bool refresh=true)
 The calculated motor output for differential followers. More...
 
StatusSignal< double > & GetDifferentialClosedLoopProportionalOutput (bool refresh=true)
 Differential closed loop proportional component. More...
 
StatusSignal< double > & GetDifferentialClosedLoopIntegratedOutput (bool refresh=true)
 Differential closed loop integrated component. More...
 
StatusSignal< double > & GetDifferentialClosedLoopFeedForward (bool refresh=true)
 Differential Feedforward passed by the user. More...
 
StatusSignal< double > & GetDifferentialClosedLoopDerivativeOutput (bool refresh=true)
 Differential closed loop derivative component. More...
 
StatusSignal< double > & GetDifferentialClosedLoopOutput (bool refresh=true)
 Differential closed loop total output. More...
 
StatusSignal< double > & GetDifferentialClosedLoopReference (bool refresh=true)
 Value that the differential closed loop is targeting. More...
 
StatusSignal< double > & GetDifferentialClosedLoopReferenceSlope (bool refresh=true)
 Derivative of the target that the differential closed loop is targeting. More...
 
StatusSignal< double > & GetDifferentialClosedLoopError (bool refresh=true)
 The difference between target differential 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::DifferentialDutyCycle &request)
 Request a specified motor duty cycle with a differential position closed-loop. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialDutyCycle &&request)
 Request a specified motor duty cycle with a differential position closed-loop. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialVoltage &request)
 Request a specified voltage with a differential position closed-loop. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialVoltage &&request)
 Request a specified voltage with a differential position closed-loop. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialPositionDutyCycle &request)
 Request PID to target position with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialPositionDutyCycle &&request)
 Request PID to target position with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialPositionVoltage &request)
 Request PID to target position with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialPositionVoltage &&request)
 Request PID to target position with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialVelocityDutyCycle &request)
 Request PID to target velocity with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialVelocityDutyCycle &&request)
 Request PID to target velocity with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialVelocityVoltage &request)
 Request PID to target velocity with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialVelocityVoltage &&request)
 Request PID to target velocity with a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialMotionMagicDutyCycle &request)
 Requests Motion MagicĀ® to target a final position using a motion profile, and PID to a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialMotionMagicDutyCycle &&request)
 Requests Motion MagicĀ® to target a final position using a motion profile, and PID to a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialMotionMagicVoltage &request)
 Requests Motion MagicĀ® to target a final position using a motion profile, and PID to a differential position setpoint. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialMotionMagicVoltage &&request)
 Requests Motion MagicĀ® to target a final position using a motion profile, and PID to a differential position setpoint. 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::DifferentialFollower &request)
 Follow the differential motor output of another Talon. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialFollower &&request)
 Follow the differential motor output of another Talon. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialStrictFollower &request)
 Follow the differential motor output of another Talon while ignoring the master's invert setting. More...
 
ctre::phoenix::StatusCode SetControl (controls::DifferentialStrictFollower &&request)
 Follow the differential 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::MusicTone &request)
 Plays a single tone at the user specified frequency. More...
 
ctre::phoenix::StatusCode SetControl (controls::MusicTone &&request)
 Plays a single tone at the user specified frequency. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVelocityDutyCycle &request)
 Requests Motion MagicĀ® to target a final velocity using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVelocityDutyCycle &&request)
 Requests Motion MagicĀ® to target a final velocity using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVelocityTorqueCurrentFOC &request)
 Requests Motion MagicĀ® to target a final velocity using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVelocityTorqueCurrentFOC &&request)
 Requests Motion MagicĀ® to target a final velocity using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVelocityVoltage &request)
 Requests Motion MagicĀ® to target a final velocity using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicVelocityVoltage &&request)
 Requests Motion MagicĀ® to target a final velocity using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicExpoDutyCycle &request)
 Requests Motion MagicĀ® to target a final position using an exponential motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicExpoDutyCycle &&request)
 Requests Motion MagicĀ® to target a final position using an exponential motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicExpoVoltage &request)
 Requests Motion MagicĀ® to target a final position using an exponential motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicExpoVoltage &&request)
 Requests Motion MagicĀ® to target a final position using an exponential motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicExpoTorqueCurrentFOC &request)
 Requests Motion MagicĀ® to target a final position using an exponential motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::MotionMagicExpoTorqueCurrentFOC &&request)
 Requests Motion MagicĀ® to target a final position using an exponential motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::DynamicMotionMagicDutyCycle &request)
 Requests Motion MagicĀ® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::DynamicMotionMagicDutyCycle &&request)
 Requests Motion MagicĀ® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::DynamicMotionMagicVoltage &request)
 Requests Motion MagicĀ® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::DynamicMotionMagicVoltage &&request)
 Requests Motion MagicĀ® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::DynamicMotionMagicTorqueCurrentFOC &request)
 Requests Motion MagicĀ® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::DynamicMotionMagicTorqueCurrentFOC &&request)
 Requests Motion MagicĀ® to target a final position using a motion profile. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_DutyCycleOut_Position &request)
 Differential control with duty cycle average target and position difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_DutyCycleOut_Position &&request)
 Differential control with duty cycle average target and position difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionDutyCycle_Position &request)
 Differential control with position average target and position difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionDutyCycle_Position &&request)
 Differential control with position average target and position difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityDutyCycle_Position &request)
 Differential control with velocity average target and position difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityDutyCycle_Position &&request)
 Differential control with velocity average target and position difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicDutyCycle_Position &request)
 Differential control with Motion MagicĀ® average target and position difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicDutyCycle_Position &&request)
 Differential control with Motion MagicĀ® average target and position difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_DutyCycleOut_Velocity &request)
 Differential control with duty cycle average target and velocity difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_DutyCycleOut_Velocity &&request)
 Differential control with duty cycle average target and velocity difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionDutyCycle_Velocity &request)
 Differential control with position average target and velocity difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionDutyCycle_Velocity &&request)
 Differential control with position average target and velocity difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityDutyCycle_Velocity &request)
 Differential control with velocity average target and velocity difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityDutyCycle_Velocity &&request)
 Differential control with velocity average target and velocity difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicDutyCycle_Velocity &request)
 Differential control with Motion MagicĀ® average target and velocity difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicDutyCycle_Velocity &&request)
 Differential control with Motion MagicĀ® average target and velocity difference target using dutycycle control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VoltageOut_Position &request)
 Differential control with voltage average target and position difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VoltageOut_Position &&request)
 Differential control with voltage average target and position difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionVoltage_Position &request)
 Differential control with position average target and position difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionVoltage_Position &&request)
 Differential control with position average target and position difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityVoltage_Position &request)
 Differential control with velocity average target and position difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityVoltage_Position &&request)
 Differential control with velocity average target and position difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicVoltage_Position &request)
 Differential control with Motion MagicĀ® average target and position difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicVoltage_Position &&request)
 Differential control with Motion MagicĀ® average target and position difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VoltageOut_Velocity &request)
 Differential control with voltage average target and velocity difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VoltageOut_Velocity &&request)
 Differential control with voltage average target and velocity difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionVoltage_Velocity &request)
 Differential control with position average target and velocity difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionVoltage_Velocity &&request)
 Differential control with position average target and velocity difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityVoltage_Velocity &request)
 Differential control with velocity average target and velocity difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityVoltage_Velocity &&request)
 Differential control with velocity average target and velocity difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicVoltage_Velocity &request)
 Differential control with Motion MagicĀ® average target and velocity difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicVoltage_Velocity &&request)
 Differential control with Motion MagicĀ® average target and velocity difference target using voltage control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_TorqueCurrentFOC_Position &request)
 Differential control with torque current average target and position difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_TorqueCurrentFOC_Position &&request)
 Differential control with torque current average target and position difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionTorqueCurrentFOC_Position &request)
 Differential control with position average target and position difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionTorqueCurrentFOC_Position &&request)
 Differential control with position average target and position difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityTorqueCurrentFOC_Position &request)
 Differential control with velocity average target and position difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityTorqueCurrentFOC_Position &&request)
 Differential control with velocity average target and position difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicTorqueCurrentFOC_Position &request)
 Differential control with Motion MagicĀ® average target and position difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicTorqueCurrentFOC_Position &&request)
 Differential control with Motion MagicĀ® average target and position difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_TorqueCurrentFOC_Velocity &request)
 Differential control with torque current average target and velocity difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_TorqueCurrentFOC_Velocity &&request)
 Differential control with torque current average target and velocity difference target. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionTorqueCurrentFOC_Velocity &request)
 Differential control with position average target and velocity difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_PositionTorqueCurrentFOC_Velocity &&request)
 Differential control with position average target and velocity difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityTorqueCurrentFOC_Velocity &request)
 Differential control with velocity average target and velocity difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_VelocityTorqueCurrentFOC_Velocity &&request)
 Differential control with velocity average target and velocity difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicTorqueCurrentFOC_Velocity &request)
 Differential control with Motion MagicĀ® average target and velocity difference target using torque current control. More...
 
ctre::phoenix::StatusCode SetControl (controls::compound::Diff_MotionMagicTorqueCurrentFOC_Velocity &&request)
 Differential control with Motion MagicĀ® average target and velocity difference target using torque current control. 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 SetPosition (units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
 Sets the mechanism position of the device in mechanism rotations. More...
 
ctre::phoenix::StatusCode SetPosition (units::angle::turn_t newValue)
 Sets the mechanism position of the device in mechanism rotations. 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...
 
ctre::phoenix::StatusCode ClearStickyFault_Hardware (units::time::second_t timeoutSeconds)
 Clear sticky fault: Hardware fault occurred. More...
 
ctre::phoenix::StatusCode ClearStickyFault_Hardware ()
 Clear sticky fault: Hardware fault occurred. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp (units::time::second_t timeoutSeconds)
 Clear sticky fault: Processor temperature exceeded limit. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp ()
 Clear sticky fault: Processor temperature exceeded limit. More...
 
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp (units::time::second_t timeoutSeconds)
 Clear sticky fault: Device temperature exceeded limit. More...
 
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp ()
 Clear sticky fault: Device temperature exceeded limit. More...
 
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage (units::time::second_t timeoutSeconds)
 Clear sticky fault: Device supply voltage dropped to near brownout levels. More...
 
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage ()
 Clear sticky fault: Device supply voltage dropped to near brownout levels. More...
 
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable (units::time::second_t timeoutSeconds)
 Clear sticky fault: Device boot while detecting the enable signal. More...
 
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable ()
 Clear sticky fault: Device boot while detecting the enable signal. More...
 
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout (units::time::second_t timeoutSeconds)
 Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low. More...
 
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout ()
 Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low. More...
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote sensor has reset. More...
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset ()
 Clear sticky fault: The remote sensor has reset. More...
 
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote Talon FX used for differential control is not present on CAN Bus. More...
 
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX ()
 Clear sticky fault: The remote Talon FX used for differential control is not present on CAN Bus. More...
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote sensor position has overflowed. More...
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow ()
 Clear sticky fault: The remote sensor position has overflowed. More...
 
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV (units::time::second_t timeoutSeconds)
 Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device. More...
 
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV ()
 Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device. More...
 
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV (units::time::second_t timeoutSeconds)
 Clear sticky fault: Supply Voltage is unstable. More...
 
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV ()
 Clear sticky fault: Supply Voltage is unstable. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit (units::time::second_t timeoutSeconds)
 Clear sticky fault: Reverse limit switch has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit ()
 Clear sticky fault: Reverse limit switch has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit (units::time::second_t timeoutSeconds)
 Clear sticky fault: Forward limit switch has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit ()
 Clear sticky fault: Forward limit switch has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit (units::time::second_t timeoutSeconds)
 Clear sticky fault: Reverse soft limit has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit ()
 Clear sticky fault: Reverse soft limit has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit (units::time::second_t timeoutSeconds)
 Clear sticky fault: Forward soft limit has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit ()
 Clear sticky fault: Forward soft limit has been asserted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote soft limit device is not present on CAN Bus. More...
 
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote ()
 Clear sticky fault: The remote soft limit device is not present on CAN Bus. More...
 
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote limit switch device is not present on CAN Bus. More...
 
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote ()
 Clear sticky fault: The remote limit switch device is not present on CAN Bus. More...
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote sensor's data is no longer trusted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid ()
 Clear sticky fault: The remote sensor's data is no longer trusted. More...
 
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync (units::time::second_t timeoutSeconds)
 Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor. More...
 
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync ()
 Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor. More...
 
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit (units::time::second_t timeoutSeconds)
 Clear sticky fault: Stator current limit occured. More...
 
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit ()
 Clear sticky fault: Stator current limit occured. More...
 
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit (units::time::second_t timeoutSeconds)
 Clear sticky fault: Supply current limit occured. More...
 
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit ()
 Clear sticky fault: Supply current limit occured. More...
 
- Public Member Functions inherited from ctre::phoenix6::hardware::ParentDevice
 ParentDevice (int deviceID, std::string model, std::string canbus)
 
virtual ~ParentDevice ()=default
 
 ParentDevice (ParentDevice const &)=delete
 
ParentDeviceoperator= (ParentDevice const &)=delete
 
int GetDeviceID () const
 
const std::string & GetNetwork () const
 
uint64_t GetDeviceHash () const
 Gets a number unique for this device's hardware type and ID. More...
 
std::shared_ptr< const controls::ControlRequestGetAppliedControl () const
 Get the latest applied control. More...
 
std::shared_ptr< controls::ControlRequestGetAppliedControl ()
 Get the latest applied control. More...
 
bool HasResetOccurred ()
 
std::function< bool()> GetResetOccurredChecker () const
 
StatusSignal< double > & GetGenericSignal (uint32_t signal, bool refresh=true)
 This is a reserved routine for internal testing. More...
 
ctre::phoenix::StatusCode OptimizeBusUtilization (units::frequency::hertz_t optimizedFreqHz=0_Hz, units::time::second_t timeoutSeconds=100_ms)
 Optimizes the device's bus utilization by reducing the update frequencies of its status signals. More...
 

Static Public Attributes

static constexpr auto kDefaultSafetyExpiration = 100_ms
 The default motor safety timeout IF calling application enables the feature. More...
 

Protected Member Functions

ctre::phoenix::StatusCode SetControlPrivate (controls::ControlRequest &request) override
 
- Protected Member Functions inherited from ctre::phoenix6::hardware::ParentDevice
virtual ctre::phoenix::StatusCode SetControlPrivate (controls::ControlRequest &request)
 
template<typename T >
StatusSignal< T > & LookupStatusSignal (uint16_t spn, std::string signalName, bool reportOnConstruction, bool refresh)
 
template<typename T >
StatusSignal< T > & LookupStatusSignal (uint16_t spn, uint16_t mapper_iter, std::function< std::map< int, StatusSignal< T > >()> map_filler, std::string signalName, bool reportOnConstruction, bool refresh)
 
template<typename T , typename U >
StatusSignal< T > LookupDimensionlessStatusSignal (uint16_t spn, std::string signalName, bool refresh)
 Returns a unitless version of the StatusSignal by value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ctre::phoenix6::hardware::ParentDevice
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>>
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (Devices &... devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals. More...
 
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (const std::vector< ParentDevice * > &devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals. More...
 
template<size_t N>
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (const std::array< ParentDevice *, N > &devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals. More...
 
template<typename... Devices, typename = std::enable_if_t<is_all_device_v<Devices...>>>
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, Devices &... devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals. More...
 
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, const std::vector< ParentDevice * > &devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals. More...
 
template<size_t N>
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, const std::array< ParentDevice *, N > &devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals. More...
 
- Protected Attributes inherited from ctre::phoenix6::hardware::ParentDevice
DeviceIdentifier deviceIdentifier
 
- Static Protected Attributes inherited from ctre::phoenix6::hardware::ParentDevice
static controls::EmptyControl _emptyControl {}
 
template<typename... Devices>
static constexpr bool is_all_device_v = is_all_device<Devices...>::value
 Whether all types passed in are subclasses of ParentDevice. More...
 

Detailed Description

Class description for the Talon FX integrated motor controller.

Constructor & Destructor Documentation

◆ TalonFX() [1/2]

ctre::phoenix6::hardware::TalonFX::TalonFX ( 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

◆ TalonFX() [2/2]

ctre::phoenix6::hardware::TalonFX::TalonFX ( int  deviceId,
CANBus  canbus 
)
inline

Constructs a new Talon FX motor controller object.

Parameters
deviceIdID of the device, as configured in Phoenix Tuner.
canbusThe CAN bus this device is on.

◆ ~TalonFX()

ctre::phoenix6::hardware::TalonFX::~TalonFX ( )

Member Function Documentation

◆ Disable()

void ctre::phoenix6::hardware::TalonFX::Disable ( )
override

Common interface for disabling a motor controller.

◆ Feed()

void ctre::phoenix6::hardware::TalonFX::Feed ( )

Feed the motor safety object.

Resets the timer on this object that is used to do the timeouts.

◆ Get()

double ctre::phoenix6::hardware::TalonFX::Get ( ) const
override

Common interface for getting the current set speed of a motor controller.

Returns
The current set speed. Value is between -1.0 and 1.0.

◆ GetDescription()

std::string ctre::phoenix6::hardware::TalonFX::GetDescription ( ) const
Returns
Description of motor controller

◆ GetExpiration()

units::second_t ctre::phoenix6::hardware::TalonFX::GetExpiration ( ) const

Retrieve the timeout value for the corresponding motor safety object.

Returns
the timeout value.

◆ GetInverted()

bool ctre::phoenix6::hardware::TalonFX::GetInverted ( ) const
override

Common interface for returning the inversion state of a motor controller.

Since invert is a config, this API is blocking. We recommend that users avoid calling this API periodically.

Deprecated:
This API is deprecated for removal in 2026. Since invert is a config, read the invert setting as part of a full configs::TalonFXConfiguration object or using a configs::MotorOutputConfigs object. Applied invert, which may not match the invert config for followers, can also be fetched using GetAppliedRotorPolarity.
Returns
The state of the inversion, true is inverted.

◆ InitSendable()

void ctre::phoenix6::hardware::TalonFX::InitSendable ( wpi::SendableBuilder &  builder)
override

◆ IsAlive()

bool ctre::phoenix6::hardware::TalonFX::IsAlive ( ) const

Determine of the motor is still operating or has timed out.

Returns
true if the motor is still operating normally and hasn't timed out.

◆ IsSafetyEnabled()

bool ctre::phoenix6::hardware::TalonFX::IsSafetyEnabled ( ) const

Return the state of the motor safety enabled flag.

Return if the motor safety is currently enabled for this device.

Returns
True if motor safety is enforced for this device

◆ Set()

void ctre::phoenix6::hardware::TalonFX::Set ( double  speed)
override

Common interface for setting the speed of a motor controller.

Parameters
speedThe speed to set. Value should be between -1.0 and 1.0.

◆ SetControlPrivate()

ctre::phoenix::StatusCode ctre::phoenix6::hardware::TalonFX::SetControlPrivate ( controls::ControlRequest request)
overrideprotectedvirtual

◆ SetExpiration()

void ctre::phoenix6::hardware::TalonFX::SetExpiration ( units::second_t  expirationTime)

Set the expiration time for the corresponding motor safety object.

Parameters
expirationTimeThe timeout value.

◆ SetInverted()

void ctre::phoenix6::hardware::TalonFX::SetInverted ( bool  isInverted)
override

Common interface for inverting direction of a motor controller.

Since invert is a config, this API is blocking. We recommend that users avoid calling this API periodically.

Since invert affects the reported motor position, this API should be called before any calls to SetPosition.

Deprecated:
This API is deprecated for removal in 2026. Since invert is a config, apply the invert setting as part of a full configs::TalonFXConfiguration object. Invert can be found in the MotorOutput config group.
Parameters
isInvertedThe state of inversion, true is inverted.

◆ SetNeutralMode()

ctre::phoenix::StatusCode ctre::phoenix6::hardware::TalonFX::SetNeutralMode ( signals::NeutralModeValue  neutralMode,
units::second_t  timeoutSeconds = 100_ms 
)

Sets the mode of operation when output is neutral or disabled.

Since neutral mode is a config, this API is blocking. We recommend that users avoid calling this API periodically.

Parameters
neutralModeThe state of the motor controller bridge when output is neutral or disabled
timeoutSecondsMaximum amount of time to wait when performing configuration
Returns
Status of refreshing and applying the neutral mode config

◆ SetSafetyEnabled()

void ctre::phoenix6::hardware::TalonFX::SetSafetyEnabled ( bool  enabled)

Enable/disable motor safety for this device.

Turn on and off the motor safety option for this object.

Parameters
enabledTrue if motor safety is enforced for this object.

◆ SetVoltage()

void ctre::phoenix6::hardware::TalonFX::SetVoltage ( units::volt_t  volts)
override

Common interface for seting the direct voltage output of a motor controller.

Parameters
voltsThe voltage to output.

◆ StopMotor()

void ctre::phoenix6::hardware::TalonFX::StopMotor ( )
override

Common interface to stop motor movement until Set is called again.

Member Data Documentation

◆ kDefaultSafetyExpiration

constexpr auto ctre::phoenix6::hardware::TalonFX::kDefaultSafetyExpiration = 100_ms
staticconstexpr

The default motor safety timeout IF calling application enables the feature.


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