CTRE Phoenix 6 C++ 26.0.0-beta-1
Loading...
Searching...
No Matches
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 ctre::phoenix6::hardware::traits::CommonTalonWithFOC ctre::phoenix6::hardware::traits::CommonDevice ctre::phoenix6::hardware::traits::CommonTalon ctre::phoenix6::hardware::traits::SupportsFOC ctre::phoenix6::hardware::traits::SupportsMusic ctre::phoenix6::hardware::traits::HasTalonControls ctre::phoenix6::hardware::traits::HasTalonSignals ctre::phoenix6::hardware::traits::CommonDevice ctre::phoenix6::hardware::traits::CommonDevice ctre::phoenix6::hardware::traits::CommonDevice ctre::phoenix6::hardware::traits::CommonDevice

Public Member Functions

 TalonFX (int deviceId, CANBus canbus={})
 Constructs a new Talon FX motor controller object.
 
 TalonFX (int deviceId, std::string canbus)
 Constructs a new Talon FX motor controller object.
 
 ~TalonFX ()
 
void Set (double speed)
 Common interface for setting the speed of a motor controller.
 
void SetVoltage (units::volt_t volts)
 Common interface for seting the direct voltage output of a motor controller.
 
double Get () const
 Common interface for getting the current set speed of a motor controller.
 
void Disable ()
 Common interface for disabling a motor controller.
 
void StopMotor ()
 Common interface to stop motor movement until Set is called again.
 
ctre::phoenix::StatusCode SetNeutralMode (signals::NeutralModeValue neutralMode, units::second_t timeoutSeconds=100_ms)
 Sets the mode of operation when output is neutral or disabled.
 
virtual std::string GetDescription () const
 
void InitSendable (wpi::SendableBuilder &builder) override
 
void Feed ()
 Feed the motor safety object.
 
void SetExpiration (units::second_t expirationTime)
 Set the expiration time for the corresponding motor safety object.
 
units::second_t GetExpiration () const
 Retrieve the timeout value for the corresponding motor safety object.
 
bool IsAlive () const
 Determine of the motor is still operating or has timed out.
 
void SetSafetyEnabled (bool enabled)
 Enable/disable motor safety for this device.
 
bool IsSafetyEnabled () const
 Return the state of the motor safety enabled flag.
 
- Public Member Functions inherited from ctre::phoenix6::hardware::core::CoreTalonFX
 CoreTalonFX (int deviceId, CANBus canbus={})
 Constructs a new Talon FX motor controller object.
 
 CoreTalonFX (int deviceId, std::string canbus)
 Constructs a new Talon FX motor controller object.
 
configs::TalonFXConfiguratorGetConfigurator ()
 Gets the configurator for this TalonFX.
 
configs::TalonFXConfigurator const & GetConfigurator () const
 Gets the configurator for this TalonFX.
 
sim::TalonFXSimStateGetSimState ()
 Get the simulation state for this device.
 
StatusSignal< int > & GetVersionMajor (bool refresh=true) final
 App Major Version number.
 
StatusSignal< int > & GetVersionMinor (bool refresh=true) final
 App Minor Version number.
 
StatusSignal< int > & GetVersionBugfix (bool refresh=true) final
 App Bugfix Version number.
 
StatusSignal< int > & GetVersionBuild (bool refresh=true) final
 App Build Version number.
 
StatusSignal< int > & GetVersion (bool refresh=true) final
 Full Version of firmware in device.
 
StatusSignal< int > & GetFaultField (bool refresh=true) final
 Integer representing all fault flags reported by the device.
 
StatusSignal< int > & GetStickyFaultField (bool refresh=true) final
 Integer representing all (persistent) sticky fault flags reported by the device.
 
StatusSignal< units::voltage::volt_t > & GetMotorVoltage (bool refresh=true) final
 The applied (output) motor voltage.
 
StatusSignal< signals::ForwardLimitValue > & GetForwardLimit (bool refresh=true) final
 Forward Limit Pin.
 
StatusSignal< signals::ReverseLimitValue > & GetReverseLimit (bool refresh=true) final
 Reverse Limit Pin.
 
StatusSignal< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity (bool refresh=true) final
 The applied rotor polarity as seen from the front of the motor.
 
StatusSignal< units::dimensionless::scalar_t > & GetDutyCycle (bool refresh=true) final
 The applied motor duty cycle.
 
StatusSignal< units::current::ampere_t > & GetTorqueCurrent (bool refresh=true) final
 Current corresponding to the torque output by the motor.
 
StatusSignal< units::current::ampere_t > & GetStatorCurrent (bool refresh=true) final
 Current corresponding to the stator windings.
 
StatusSignal< units::current::ampere_t > & GetSupplyCurrent (bool refresh=true) final
 Measured supply side current.
 
StatusSignal< units::voltage::volt_t > & GetSupplyVoltage (bool refresh=true) final
 Measured supply voltage to the device.
 
StatusSignal< units::temperature::celsius_t > & GetDeviceTemp (bool refresh=true) final
 Temperature of device.
 
StatusSignal< units::temperature::celsius_t > & GetProcessorTemp (bool refresh=true) final
 Temperature of the processor.
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetRotorVelocity (bool refresh=true) final
 Velocity of the motor rotor.
 
StatusSignal< units::angle::turn_t > & GetRotorPosition (bool refresh=true) final
 Position of the motor rotor.
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetVelocity (bool refresh=true) final
 Velocity of the device in mechanism rotations per second.
 
StatusSignal< units::angle::turn_t > & GetPosition (bool refresh=true) final
 Position of the device in mechanism rotations.
 
StatusSignal< units::angular_acceleration::turns_per_second_squared_t > & GetAcceleration (bool refresh=true) final
 Acceleration of the device in mechanism rotations per second².
 
StatusSignal< signals::ControlModeValue > & GetControlMode (bool refresh=true) final
 The active control mode of the motor controller.
 
StatusSignal< bool > & GetMotionMagicAtTarget (bool refresh=true) final
 Check if the Motion Magic® profile has reached the target.
 
StatusSignal< bool > & GetMotionMagicIsRunning (bool refresh=true) final
 Check if Motion Magic® is running.
 
StatusSignal< signals::RobotEnableValue > & GetRobotEnable (bool refresh=true) final
 Indicates if the robot is enabled.
 
StatusSignal< signals::DeviceEnableValue > & GetDeviceEnable (bool refresh=true) final
 Indicates if device is actuator enabled.
 
StatusSignal< int > & GetClosedLoopSlot (bool refresh=true) final
 The slot that the closed-loop PID is using.
 
StatusSignal< signals::MotorOutputStatusValue > & GetMotorOutputStatus (bool refresh=true) final
 Assess the status of the motor output with respect to load and supply.
 
StatusSignal< signals::DifferentialControlModeValue > & GetDifferentialControlMode (bool refresh=true) final
 The active control mode of the differential controller.
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialAverageVelocity (bool refresh=true) final
 Average component of the differential velocity of device.
 
StatusSignal< units::angle::turn_t > & GetDifferentialAveragePosition (bool refresh=true) final
 Average component of the differential position of device.
 
StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialDifferenceVelocity (bool refresh=true) final
 Difference component of the differential velocity of device.
 
StatusSignal< units::angle::turn_t > & GetDifferentialDifferencePosition (bool refresh=true) final
 Difference component of the differential position of device.
 
StatusSignal< int > & GetDifferentialClosedLoopSlot (bool refresh=true) final
 The slot that the closed-loop differential PID is using.
 
StatusSignal< ctre::unit::newton_meters_per_ampere_t > & GetMotorKT (bool refresh=true) final
 The torque constant (K_T) of the motor.
 
StatusSignal< ctre::unit::rpm_per_volt_t > & GetMotorKV (bool refresh=true) final
 The velocity constant (K_V) of the motor.
 
StatusSignal< units::current::ampere_t > & GetMotorStallCurrent (bool refresh=true) final
 The stall current of the motor at 12 V output.
 
StatusSignal< signals::BridgeOutputValue > & GetBridgeOutput (bool refresh=true) final
 The applied output of the bridge.
 
StatusSignal< bool > & GetIsProLicensed (bool refresh=true) final
 Whether the device is Phoenix Pro licensed.
 
StatusSignal< units::temperature::celsius_t > & GetAncillaryDeviceTemp (bool refresh=true) final
 Temperature of device from second sensor.
 
StatusSignal< signals::ConnectedMotorValue > & GetConnectedMotor (bool refresh=true) final
 The type of motor attached to the Talon.
 
StatusSignal< bool > & GetFault_Hardware (bool refresh=true) final
 Hardware fault occurred.
 
StatusSignal< bool > & GetStickyFault_Hardware (bool refresh=true) final
 Hardware fault occurred.
 
StatusSignal< bool > & GetFault_ProcTemp (bool refresh=true) final
 Processor temperature exceeded limit.
 
StatusSignal< bool > & GetStickyFault_ProcTemp (bool refresh=true) final
 Processor temperature exceeded limit.
 
StatusSignal< bool > & GetFault_DeviceTemp (bool refresh=true) final
 Device temperature exceeded limit.
 
StatusSignal< bool > & GetStickyFault_DeviceTemp (bool refresh=true) final
 Device temperature exceeded limit.
 
StatusSignal< bool > & GetFault_Undervoltage (bool refresh=true) final
 Device supply voltage dropped to near brownout levels.
 
StatusSignal< bool > & GetStickyFault_Undervoltage (bool refresh=true) final
 Device supply voltage dropped to near brownout levels.
 
StatusSignal< bool > & GetFault_BootDuringEnable (bool refresh=true) final
 Device boot while detecting the enable signal.
 
StatusSignal< bool > & GetStickyFault_BootDuringEnable (bool refresh=true) final
 Device boot while detecting the enable signal.
 
StatusSignal< bool > & GetFault_UnlicensedFeatureInUse (bool refresh=true) final
 An unlicensed feature is in use, device may not behave as expected.
 
StatusSignal< bool > & GetStickyFault_UnlicensedFeatureInUse (bool refresh=true) final
 An unlicensed feature is in use, device may not behave as expected.
 
StatusSignal< bool > & GetFault_BridgeBrownout (bool refresh=true) final
 Bridge was disabled most likely due to supply voltage dropping too low.
 
StatusSignal< bool > & GetStickyFault_BridgeBrownout (bool refresh=true) final
 Bridge was disabled most likely due to supply voltage dropping too low.
 
StatusSignal< bool > & GetFault_RemoteSensorReset (bool refresh=true) final
 The remote sensor has reset.
 
StatusSignal< bool > & GetStickyFault_RemoteSensorReset (bool refresh=true) final
 The remote sensor has reset.
 
StatusSignal< bool > & GetFault_MissingDifferentialFX (bool refresh=true) final
 The remote Talon used for differential control is not present on CAN Bus.
 
StatusSignal< bool > & GetStickyFault_MissingDifferentialFX (bool refresh=true) final
 The remote Talon used for differential control is not present on CAN Bus.
 
StatusSignal< bool > & GetFault_RemoteSensorPosOverflow (bool refresh=true) final
 The remote sensor position has overflowed.
 
StatusSignal< bool > & GetStickyFault_RemoteSensorPosOverflow (bool refresh=true) final
 The remote sensor position has overflowed.
 
StatusSignal< bool > & GetFault_OverSupplyV (bool refresh=true) final
 Supply Voltage has exceeded the maximum voltage rating of device.
 
StatusSignal< bool > & GetStickyFault_OverSupplyV (bool refresh=true) final
 Supply Voltage has exceeded the maximum voltage rating of device.
 
StatusSignal< bool > & GetFault_UnstableSupplyV (bool refresh=true) final
 Supply Voltage is unstable.
 
StatusSignal< bool > & GetStickyFault_UnstableSupplyV (bool refresh=true) final
 Supply Voltage is unstable.
 
StatusSignal< bool > & GetFault_ReverseHardLimit (bool refresh=true) final
 Reverse limit switch has been asserted.
 
StatusSignal< bool > & GetStickyFault_ReverseHardLimit (bool refresh=true) final
 Reverse limit switch has been asserted.
 
StatusSignal< bool > & GetFault_ForwardHardLimit (bool refresh=true) final
 Forward limit switch has been asserted.
 
StatusSignal< bool > & GetStickyFault_ForwardHardLimit (bool refresh=true) final
 Forward limit switch has been asserted.
 
StatusSignal< bool > & GetFault_ReverseSoftLimit (bool refresh=true) final
 Reverse soft limit has been asserted.
 
StatusSignal< bool > & GetStickyFault_ReverseSoftLimit (bool refresh=true) final
 Reverse soft limit has been asserted.
 
StatusSignal< bool > & GetFault_ForwardSoftLimit (bool refresh=true) final
 Forward soft limit has been asserted.
 
StatusSignal< bool > & GetStickyFault_ForwardSoftLimit (bool refresh=true) final
 Forward soft limit has been asserted.
 
StatusSignal< bool > & GetFault_MissingSoftLimitRemote (bool refresh=true) final
 The remote soft limit device is not present on CAN Bus.
 
StatusSignal< bool > & GetStickyFault_MissingSoftLimitRemote (bool refresh=true) final
 The remote soft limit device is not present on CAN Bus.
 
StatusSignal< bool > & GetFault_MissingHardLimitRemote (bool refresh=true) final
 The remote limit switch device is not present on CAN Bus.
 
StatusSignal< bool > & GetStickyFault_MissingHardLimitRemote (bool refresh=true) final
 The remote limit switch device is not present on CAN Bus.
 
StatusSignal< bool > & GetFault_RemoteSensorDataInvalid (bool refresh=true) final
 The remote sensor's data is no longer trusted.
 
StatusSignal< bool > & GetStickyFault_RemoteSensorDataInvalid (bool refresh=true) final
 The remote sensor's data is no longer trusted.
 
StatusSignal< bool > & GetFault_FusedSensorOutOfSync (bool refresh=true) final
 The remote sensor used for fusion has fallen out of sync to the local sensor.
 
StatusSignal< bool > & GetStickyFault_FusedSensorOutOfSync (bool refresh=true) final
 The remote sensor used for fusion has fallen out of sync to the local sensor.
 
StatusSignal< bool > & GetFault_StatorCurrLimit (bool refresh=true) final
 Stator current limit occured.
 
StatusSignal< bool > & GetStickyFault_StatorCurrLimit (bool refresh=true) final
 Stator current limit occured.
 
StatusSignal< bool > & GetFault_SupplyCurrLimit (bool refresh=true) final
 Supply current limit occured.
 
StatusSignal< bool > & GetStickyFault_SupplyCurrLimit (bool refresh=true) final
 Supply current limit occured.
 
StatusSignal< bool > & GetFault_UsingFusedCANcoderWhileUnlicensed (bool refresh=true) final
 Using Fused CANcoder feature while unlicensed.
 
StatusSignal< bool > & GetStickyFault_UsingFusedCANcoderWhileUnlicensed (bool refresh=true) final
 Using Fused CANcoder feature while unlicensed.
 
StatusSignal< bool > & GetFault_StaticBrakeDisabled (bool refresh=true) final
 Static brake was momentarily disabled due to excessive braking current while disabled.
 
StatusSignal< bool > & GetStickyFault_StaticBrakeDisabled (bool refresh=true) final
 Static brake was momentarily disabled due to excessive braking current while disabled.
 
StatusSignal< double > & GetClosedLoopProportionalOutput (bool refresh=true) final
 Closed loop proportional component.
 
StatusSignal< double > & GetClosedLoopIntegratedOutput (bool refresh=true) final
 Closed loop integrated component.
 
StatusSignal< double > & GetClosedLoopFeedForward (bool refresh=true) final
 Feedforward passed by the user.
 
StatusSignal< double > & GetClosedLoopDerivativeOutput (bool refresh=true) final
 Closed loop derivative component.
 
StatusSignal< double > & GetClosedLoopOutput (bool refresh=true) final
 Closed loop total output.
 
StatusSignal< double > & GetClosedLoopReference (bool refresh=true) final
 Value that the closed loop is targeting.
 
StatusSignal< double > & GetClosedLoopReferenceSlope (bool refresh=true) final
 Derivative of the target that the closed loop is targeting.
 
StatusSignal< double > & GetClosedLoopError (bool refresh=true) final
 The difference between target reference and current measurement.
 
StatusSignal< double > & GetDifferentialOutput (bool refresh=true) final
 The calculated motor output for differential followers.
 
StatusSignal< double > & GetDifferentialClosedLoopProportionalOutput (bool refresh=true) final
 Differential closed loop proportional component.
 
StatusSignal< double > & GetDifferentialClosedLoopIntegratedOutput (bool refresh=true) final
 Differential closed loop integrated component.
 
StatusSignal< double > & GetDifferentialClosedLoopFeedForward (bool refresh=true) final
 Differential Feedforward passed by the user.
 
StatusSignal< double > & GetDifferentialClosedLoopDerivativeOutput (bool refresh=true) final
 Differential closed loop derivative component.
 
StatusSignal< double > & GetDifferentialClosedLoopOutput (bool refresh=true) final
 Differential closed loop total output.
 
StatusSignal< double > & GetDifferentialClosedLoopReference (bool refresh=true) final
 Value that the differential closed loop is targeting.
 
StatusSignal< double > & GetDifferentialClosedLoopReferenceSlope (bool refresh=true) final
 Derivative of the target that the differential closed loop is targeting.
 
StatusSignal< double > & GetDifferentialClosedLoopError (bool refresh=true) final
 The difference between target differential reference and current measurement.
 
ctre::phoenix::StatusCode SetControl (const controls::DutyCycleOut &request) final
 Request a specified motor duty cycle.
 
ctre::phoenix::StatusCode SetControl (const controls::TorqueCurrentFOC &request) final
 Request a specified motor current (field oriented control).
 
ctre::phoenix::StatusCode SetControl (const controls::VoltageOut &request) final
 Request a specified voltage.
 
ctre::phoenix::StatusCode SetControl (const controls::PositionDutyCycle &request) final
 Request PID to target position with duty cycle feedforward.
 
ctre::phoenix::StatusCode SetControl (const controls::PositionVoltage &request) final
 Request PID to target position with voltage feedforward.
 
ctre::phoenix::StatusCode SetControl (const controls::PositionTorqueCurrentFOC &request) final
 Request PID to target position with torque current feedforward.
 
ctre::phoenix::StatusCode SetControl (const controls::VelocityDutyCycle &request) final
 Request PID to target velocity with duty cycle feedforward.
 
ctre::phoenix::StatusCode SetControl (const controls::VelocityVoltage &request) final
 Request PID to target velocity with voltage feedforward.
 
ctre::phoenix::StatusCode SetControl (const controls::VelocityTorqueCurrentFOC &request) final
 Request PID to target velocity with torque current feedforward.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicDutyCycle &request) final
 Requests Motion Magic® to target a final position using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVoltage &request) final
 Requests Motion Magic® to target a final position using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicTorqueCurrentFOC &request) final
 Requests Motion Magic® to target a final position using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialDutyCycle &request) final
 Request a specified motor duty cycle with a differential position closed-loop.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialVoltage &request) final
 Request a specified voltage with a differential position closed-loop.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialPositionDutyCycle &request) final
 Request PID to target position with a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialPositionVoltage &request) final
 Request PID to target position with a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialVelocityDutyCycle &request) final
 Request PID to target velocity with a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialVelocityVoltage &request) final
 Request PID to target velocity with a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicDutyCycle &request) final
 Requests Motion Magic® to target a final position using a motion profile, and PID to a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicVoltage &request) final
 Requests Motion Magic® to target a final position using a motion profile, and PID to a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicExpoDutyCycle &request) final
 Requests Motion Magic® to target a final position using an exponential motion profile, and PID to a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicExpoVoltage &request) final
 Requests Motion Magic® to target a final position using an exponential motion profile, and PID to a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicVelocityDutyCycle &request) final
 Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicVelocityVoltage &request) final
 Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential position setpoint.
 
ctre::phoenix::StatusCode SetControl (const controls::Follower &request) final
 Follow the motor output of another Talon.
 
ctre::phoenix::StatusCode SetControl (const controls::StrictFollower &request) final
 Follow the motor output of another Talon while ignoring the leader's invert setting.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialFollower &request) final
 Follow the differential motor output of another Talon.
 
ctre::phoenix::StatusCode SetControl (const controls::DifferentialStrictFollower &request) final
 Follow the differential motor output of another Talon while ignoring the leader's invert setting.
 
ctre::phoenix::StatusCode SetControl (const controls::NeutralOut &request) final
 Request neutral output of actuator.
 
ctre::phoenix::StatusCode SetControl (const controls::CoastOut &request) final
 Request coast neutral output of actuator.
 
ctre::phoenix::StatusCode SetControl (const controls::StaticBrake &request) final
 Applies full neutral-brake by shorting motor leads together.
 
ctre::phoenix::StatusCode SetControl (const controls::MusicTone &request) final
 Plays a single tone at the user specified frequency.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVelocityDutyCycle &request) final
 Requests Motion Magic® to target a final velocity using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVelocityTorqueCurrentFOC &request) final
 Requests Motion Magic® to target a final velocity using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVelocityVoltage &request) final
 Requests Motion Magic® to target a final velocity using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicExpoDutyCycle &request) final
 Requests Motion Magic® to target a final position using an exponential motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicExpoVoltage &request) final
 Requests Motion Magic® to target a final position using an exponential motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::MotionMagicExpoTorqueCurrentFOC &request) final
 Requests Motion Magic® to target a final position using an exponential motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicDutyCycle &request) final
 Requests Motion Magic® to target a final position using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicVoltage &request) final
 Requests Motion Magic® to target a final position using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicTorqueCurrentFOC &request) final
 Requests Motion Magic® to target a final position using a motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicExpoDutyCycle &request) final
 Requests Motion Magic® Expo to target a final position using an exponential motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicExpoVoltage &request) final
 Requests Motion Magic® Expo to target a final position using an exponential motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicExpoTorqueCurrentFOC &request) final
 Requests Motion Magic® Expo to target a final position using an exponential motion profile.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_DutyCycleOut_Position &request) final
 Differential control with duty cycle average target and position difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionDutyCycle_Position &request) final
 Differential control with position average target and position difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityDutyCycle_Position &request) final
 Differential control with velocity average target and position difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicDutyCycle_Position &request) final
 Differential control with Motion Magic® average target and position difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoDutyCycle_Position &request) final
 Differential control with Motion Magic® Expo average target and position difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityDutyCycle_Position &request) final
 Differential control with Motion Magic® Velocity average target and position difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_DutyCycleOut_Velocity &request) final
 Differential control with duty cycle average target and velocity difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionDutyCycle_Velocity &request) final
 Differential control with position average target and velocity difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityDutyCycle_Velocity &request) final
 Differential control with velocity average target and velocity difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request) final
 Differential control with Motion Magic® average target and velocity difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoDutyCycle_Velocity &request) final
 Differential control with Motion Magic® Expo average target and velocity difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityDutyCycle_Velocity &request) final
 Differential control with Motion Magic® Velocity average target and velocity difference target using duty cycle control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_DutyCycleOut_Open &request) final
 Differential control with duty cycle average target and duty cycle difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionDutyCycle_Open &request) final
 Differential control with position average target and duty cycle difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityDutyCycle_Open &request) final
 Differential control with velocity average target and duty cycle difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicDutyCycle_Open &request) final
 Differential control with Motion Magic® average target and duty cycle difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoDutyCycle_Open &request) final
 Differential control with Motion Magic® Expo average target and duty cycle difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityDutyCycle_Open &request) final
 Differential control with Motion Magic® Velocity average target and duty cycle difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VoltageOut_Position &request) final
 Differential control with voltage average target and position difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionVoltage_Position &request) final
 Differential control with position average target and position difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityVoltage_Position &request) final
 Differential control with velocity average target and position difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVoltage_Position &request) final
 Differential control with Motion Magic® average target and position difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoVoltage_Position &request) final
 Differential control with Motion Magic® Expo average target and position difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityVoltage_Position &request) final
 Differential control with Motion Magic® Velocity average target and position difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VoltageOut_Velocity &request) final
 Differential control with voltage average target and velocity difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionVoltage_Velocity &request) final
 Differential control with position average target and velocity difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityVoltage_Velocity &request) final
 Differential control with velocity average target and velocity difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVoltage_Velocity &request) final
 Differential control with Motion Magic® average target and velocity difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoVoltage_Velocity &request) final
 Differential control with Motion Magic® Expo average target and velocity difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityVoltage_Velocity &request) final
 Differential control with Motion Magic® Velocity average target and velocity difference target using voltage control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VoltageOut_Open &request) final
 Differential control with voltage average target and voltage difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionVoltage_Open &request) final
 Differential control with position average target and voltage difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityVoltage_Open &request) final
 Differential control with velocity average target and voltage difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVoltage_Open &request) final
 Differential control with Motion Magic® average target and voltage difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoVoltage_Open &request) final
 Differential control with Motion Magic® Expo average target and voltage difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityVoltage_Open &request) final
 Differential control with Motion Magic® Velocity average target and voltage difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_TorqueCurrentFOC_Position &request) final
 Differential control with torque current average target and position difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionTorqueCurrentFOC_Position &request) final
 Differential control with position average target and position difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityTorqueCurrentFOC_Position &request) final
 Differential control with velocity average target and position difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Position &request) final
 Differential control with Motion Magic® average target and position difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Position &request) final
 Differential control with Motion Magic® Expo average target and position difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Position &request) final
 Differential control with Motion Magic® Velocity average target and position difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_TorqueCurrentFOC_Velocity &request) final
 Differential control with torque current average target and velocity difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionTorqueCurrentFOC_Velocity &request) final
 Differential control with position average target and velocity difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityTorqueCurrentFOC_Velocity &request) final
 Differential control with velocity average target and velocity difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Velocity &request) final
 Differential control with Motion Magic® average target and velocity difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Velocity &request) final
 Differential control with Motion Magic® Expo average target and velocity difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Velocity &request) final
 Differential control with Motion Magic® Velocity average target and velocity difference target using torque current control.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_TorqueCurrentFOC_Open &request) final
 Differential control with torque current average target and torque current difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionTorqueCurrentFOC_Open &request) final
 Differential control with position average target and torque current difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityTorqueCurrentFOC_Open &request) final
 Differential control with velocity average target and torque current difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicTorqueCurrentFOC_Open &request) final
 Differential control with Motion Magic® average target and torque current difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoTorqueCurrentFOC_Open &request) final
 Differential control with Motion Magic® Expo average target and torque current difference target.
 
ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityTorqueCurrentFOC_Open &request) final
 Differential control with Motion Magic® Velocity average target and torque current difference target.
 
ctre::phoenix::StatusCode SetControl (controls::ControlRequest const &request) final
 Control device with generic control request object.
 
ctre::phoenix::StatusCode SetPosition (units::angle::turn_t newValue, units::time::second_t timeoutSeconds) final
 Sets the mechanism position of the device in mechanism rotations.
 
ctre::phoenix::StatusCode SetPosition (units::angle::turn_t newValue) final
 Sets the mechanism position of the device in mechanism rotations.
 
ctre::phoenix::StatusCode ClearStickyFaults (units::time::second_t timeoutSeconds) final
 Clear the sticky faults in the device.
 
ctre::phoenix::StatusCode ClearStickyFaults () final
 Clear the sticky faults in the device.
 
ctre::phoenix::StatusCode ClearStickyFault_Hardware (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Hardware fault occurred.
 
ctre::phoenix::StatusCode ClearStickyFault_Hardware () final
 Clear sticky fault: Hardware fault occurred.
 
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Processor temperature exceeded limit.
 
ctre::phoenix::StatusCode ClearStickyFault_ProcTemp () final
 Clear sticky fault: Processor temperature exceeded limit.
 
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Device temperature exceeded limit.
 
ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp () final
 Clear sticky fault: Device temperature exceeded limit.
 
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Device supply voltage dropped to near brownout levels.
 
ctre::phoenix::StatusCode ClearStickyFault_Undervoltage () final
 Clear sticky fault: Device supply voltage dropped to near brownout levels.
 
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Device boot while detecting the enable signal.
 
ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable () final
 Clear sticky fault: Device boot while detecting the enable signal.
 
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse (units::time::second_t timeoutSeconds) final
 Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
 
ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse () final
 Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
 
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
 
ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout () final
 Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote sensor has reset.
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset () final
 Clear sticky fault: The remote sensor has reset.
 
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
 
ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX () final
 Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote sensor position has overflowed.
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow () final
 Clear sticky fault: The remote sensor position has overflowed.
 
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
 
ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV () final
 Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
 
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Supply Voltage is unstable.
 
ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV () final
 Clear sticky fault: Supply Voltage is unstable.
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Reverse limit switch has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit () final
 Clear sticky fault: Reverse limit switch has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Forward limit switch has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit () final
 Clear sticky fault: Forward limit switch has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Reverse soft limit has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit () final
 Clear sticky fault: Reverse soft limit has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Forward soft limit has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit () final
 Clear sticky fault: Forward soft limit has been asserted.
 
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote soft limit device is not present on CAN Bus.
 
ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote () final
 Clear sticky fault: The remote soft limit device is not present on CAN Bus.
 
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote limit switch device is not present on CAN Bus.
 
ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote () final
 Clear sticky fault: The remote limit switch device is not present on CAN Bus.
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote sensor's data is no longer trusted.
 
ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid () final
 Clear sticky fault: The remote sensor's data is no longer trusted.
 
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync (units::time::second_t timeoutSeconds) final
 Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
 
ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync () final
 Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
 
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Stator current limit occured.
 
ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit () final
 Clear sticky fault: Stator current limit occured.
 
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Supply current limit occured.
 
ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit () final
 Clear sticky fault: Supply current limit occured.
 
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Using Fused CANcoder feature while unlicensed.
 
ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed () final
 Clear sticky fault: Using Fused CANcoder feature while unlicensed.
 
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled (units::time::second_t timeoutSeconds) final
 Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disabled.
 
ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled () final
 Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disabled.
 
- Public Member Functions inherited from ctre::phoenix6::hardware::ParentDevice
 ParentDevice (int deviceID, std::string model, CANBus canbus)
 
virtual ~ParentDevice ()=0
 
 ParentDevice (ParentDevice const &)=delete
 
ParentDeviceoperator= (ParentDevice const &)=delete
 
int GetDeviceID () const final
 
CANBus GetNetwork () const final
 
uint64_t GetDeviceHash () const final
 Gets a number unique for this device's hardware type and ID.
 
std::shared_ptr< controls::ControlRequest const > GetAppliedControl () const final
 Get the latest applied control.
 
std::shared_ptr< controls::ControlRequestGetAppliedControl () final
 Get the latest applied control.
 
bool HasResetOccurred () final
 
std::function< bool()> GetResetOccurredChecker () const final
 
bool IsConnected (units::second_t maxLatencySeconds=500_ms) final
 Returns whether the device is still connected to the robot.
 
StatusSignal< double > & GetGenericSignal (uint32_t signal, bool refresh=true)
 This is a reserved routine for internal testing.
 
ctre::phoenix::StatusCode OptimizeBusUtilization (units::frequency::hertz_t optimizedFreqHz=4_Hz, units::time::second_t timeoutSeconds=100_ms) final
 Optimizes the device's bus utilization by reducing the update frequencies of its status signals.
 
ctre::phoenix::StatusCode ResetSignalFrequencies (units::time::second_t timeoutSeconds=100_ms) final
 Resets the update frequencies of all the device's status signals to the defaults.
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::CommonDevice
virtual ~CommonDevice ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::CommonTalonWithFOC
virtual ~CommonTalonWithFOC ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::CommonTalon
virtual ~CommonTalon ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::HasTalonControls
virtual ~HasTalonControls ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::HasTalonSignals
virtual ~HasTalonSignals ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::SupportsFOC
virtual ~SupportsFOC ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::SupportsMusic
virtual ~SupportsMusic ()=default
 

Static Public Attributes

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

Protected Member Functions

ctre::phoenix::StatusCode SetControlPrivate (controls::ControlRequest const &request) override
 
- Protected Member Functions inherited from ctre::phoenix6::hardware::ParentDevice
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, std::string signalName, std::function< std::map< uint16_t, std::string >()> mapFiller, bool reportOnConstruction, bool refresh)
 

Additional Inherited Members

- Public Types inherited from ctre::phoenix6::hardware::core::CoreTalonFX
using Configuration = configs::TalonFXConfiguration
 The configuration class for this device.
 
- Static Public Member Functions inherited from ctre::phoenix6::hardware::ParentDevice
template<std::derived_from< traits::CommonDevice >... 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.
 
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (std::span< traits::CommonDevice *const > devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
 
template<std::derived_from< traits::CommonDevice >... 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.
 
static ctre::phoenix::StatusCode OptimizeBusUtilizationForAll (units::frequency::hertz_t optimizedFreqHz, std::span< traits::CommonDevice *const > devices)
 Optimizes the bus utilization of the provided devices by reducing the update frequencies of their status signals.
 
template<std::derived_from< traits::CommonDevice >... Devices>
static ctre::phoenix::StatusCode ResetSignalFrequenciesForAll (Devices &... devices)
 Resets the update frequencies of all the devices' status signals to the defaults.
 
static ctre::phoenix::StatusCode ResetSignalFrequenciesForAll (std::span< traits::CommonDevice *const > devices)
 Resets the update frequencies of all the devices' status signals to the defaults.
 
- Protected Attributes inherited from ctre::phoenix6::hardware::ParentDevice
DeviceIdentifier deviceIdentifier
 
- Static Protected Attributes inherited from ctre::phoenix6::hardware::ParentDevice
static constexpr controls::EmptyControl _emptyControl {}
 

Detailed Description

Class description for the Talon FX integrated motor controller.

Constructor & Destructor Documentation

◆ TalonFX() [1/2]

ctre::phoenix6::hardware::TalonFX::TalonFX ( int deviceId,
CANBus canbus = {} )

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() [2/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
Deprecated
Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. Construct devices using a CANBus instance instead.

◆ ~TalonFX()

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

Member Function Documentation

◆ Disable()

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

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

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()

virtual std::string ctre::phoenix6::hardware::TalonFX::GetDescription ( ) const
virtual
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.

◆ 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)

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 const & 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.

◆ 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.

This is equivalent to setting the configs::MotorOutputConfigs::NeutralMode when applying a configs::TalonFXConfiguration to the motor.

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)

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

Parameters
voltsThe voltage to output.

◆ StopMotor()

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

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

Member Data Documentation

◆ kDefaultSafetyExpiration

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: