30#include <units/angle.h>
31#include <units/angular_acceleration.h>
32#include <units/angular_velocity.h>
33#include <units/current.h>
34#include <units/dimensionless.h>
35#include <units/temperature.h>
36#include <units/voltage.h>
194 std::stringstream ss;
219 std::stringstream ss;
402 ctre::phoenix::StatusCode
Apply(
const Slot0Configs& configs, units::time::second_t timeoutSeconds)
462 ctre::phoenix::StatusCode
Apply(
const Slot1Configs& configs, units::time::second_t timeoutSeconds)
522 ctre::phoenix::StatusCode
Apply(
const Slot2Configs& configs, units::time::second_t timeoutSeconds)
1339 ctre::phoenix::StatusCode
SetRotorPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
1341 std::stringstream ss;
1384 std::stringstream ss;
1405 bool _isInitialized =
false;
1406 bool _isVersionOk =
false;
1411 units::time::second_t _resetTimestamp{0_s};
1415 void ReportIfTooOld();
1797 std::unique_ptr<sim::TalonFXSimState> _simState{};
1810 if (_simState ==
nullptr)
1811 _simState = std::make_unique<sim::TalonFXSimState>(*
this);
3719 if (DutyCycleOutValue !=
nullptr)
3722 if (TorqueCurrentFOCValue !=
nullptr)
3725 if (VoltageOutValue !=
nullptr)
3728 if (PositionDutyCycleValue !=
nullptr)
3731 if (PositionVoltageValue !=
nullptr)
3734 if (PositionTorqueCurrentFOCValue !=
nullptr)
3735 return SetControl(*PositionTorqueCurrentFOCValue);
3737 if (VelocityDutyCycleValue !=
nullptr)
3740 if (VelocityVoltageValue !=
nullptr)
3743 if (VelocityTorqueCurrentFOCValue !=
nullptr)
3744 return SetControl(*VelocityTorqueCurrentFOCValue);
3746 if (MotionMagicDutyCycleValue !=
nullptr)
3747 return SetControl(*MotionMagicDutyCycleValue);
3749 if (MotionMagicVoltageValue !=
nullptr)
3752 if (MotionMagicTorqueCurrentFOCValue !=
nullptr)
3753 return SetControl(*MotionMagicTorqueCurrentFOCValue);
3755 if (FollowerValue !=
nullptr)
3758 if (StrictFollowerValue !=
nullptr)
3761 if (NeutralOutValue !=
nullptr)
3764 if (CoastOutValue !=
nullptr)
3767 if (StaticBrakeValue !=
nullptr)
3793 ctre::phoenix::StatusCode
SetRotorPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
ii that the Software will be uninterrupted or error free
Definition: CTRE_LICENSE.txt:191
CTREXPORT int c_ctre_phoenixpro_serialize_double(int spn, double value, char **str)
@ OK
No Error.
Definition: StatusCodes.h:1101
@ NotSupported
This is not supported.
Definition: StatusCodes.h:1704
Configs that directly affect motor-output.
Definition: Configs.hpp:1494
std::string ToString() const
Definition: Configs.hpp:1506
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1524
std::string Serialize() const
Definition: Configs.hpp:1516
Configs that affect general behavior during closed-looping.
Definition: Configs.hpp:1755
std::string Serialize() const
Definition: Configs.hpp:1781
std::string ToString() const
Definition: Configs.hpp:1771
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1789
Configs that directly affect motor-output.
Definition: Configs.hpp:1259
std::string ToString() const
Definition: Configs.hpp:1292
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1314
std::string Serialize() const
Definition: Configs.hpp:1304
Configs that directly affect current limiting features.
Definition: Configs.hpp:808
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:899
std::string Serialize() const
Definition: Configs.hpp:886
std::string ToString() const
Definition: Configs.hpp:871
Configs that directly affect motor-output.
Definition: Configs.hpp:1695
std::string ToString() const
Definition: Configs.hpp:1718
std::string Serialize() const
Definition: Configs.hpp:1729
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1738
Configs that directly affect motor-output.
Definition: Configs.hpp:1068
std::string ToString() const
Definition: Configs.hpp:1140
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1166
std::string Serialize() const
Definition: Configs.hpp:1154
Configs that directly affect motor-output.
Definition: Configs.hpp:1332
std::string ToString() const
Definition: Configs.hpp:1427
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1467
std::string Serialize() const
Definition: Configs.hpp:1448
Configs that directly affect motor-output.
Definition: Configs.hpp:1620
std::string ToString() const
Definition: Configs.hpp:1655
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1677
std::string Serialize() const
Definition: Configs.hpp:1667
Configs that directly affect motor-output.
Definition: Configs.hpp:719
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:788
std::string ToString() const
Definition: Configs.hpp:762
std::string Serialize() const
Definition: Configs.hpp:776
Configs that directly affect motor-output.
Definition: Configs.hpp:1186
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1241
std::string ToString() const
Definition: Configs.hpp:1219
std::string Serialize() const
Definition: Configs.hpp:1231
Definition: Configs.hpp:22
Definition: Configurator.hpp:21
ctre::phoenix::StatusCode GetConfigsPrivate(std::string &serializedString, units::time::second_t timeoutSeconds) const
Definition: Configurator.hpp:61
units::time::second_t defaultTimeoutSeconds
The default amount of time to wait for a config.
Definition: Configurator.hpp:26
ctre::phoenix::StatusCode SetConfigsPrivate(const std::string &serializedString, units::time::second_t timeoutSeconds, bool futureProofConfigs, bool overrideIfDuplicate)
Definition: Configurator.hpp:37
What the gains for slot 0 are.
Definition: Configs.hpp:321
std::string Serialize() const
Definition: Configs.hpp:421
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:433
std::string ToString() const
Definition: Configs.hpp:407
What the gains for slot 1 are.
Definition: Configs.hpp:454
std::string ToString() const
Definition: Configs.hpp:540
std::string Serialize() const
Definition: Configs.hpp:554
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:566
What the gains for slot 2 are.
Definition: Configs.hpp:587
std::string ToString() const
Definition: Configs.hpp:673
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:699
std::string Serialize() const
Definition: Configs.hpp:687
Configs that directly affect motor-output.
Definition: Configs.hpp:1540
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1601
std::string Serialize() const
Definition: Configs.hpp:1590
std::string ToString() const
Definition: Configs.hpp:1577
Class description for the Talon FX integrated motor controller that runs on associated Falcon motors.
Definition: CoreTalonFX.hpp:56
OpenLoopRampsConfigs OpenLoopRamps
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:138
TorqueCurrentConfigs TorqueCurrent
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:124
FeedbackConfigs Feedback
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:131
ClosedLoopGeneralConfigs ClosedLoopGeneral
Configs that affect general behavior during closed-looping.
Definition: CoreTalonFX.hpp:187
SoftwareLimitSwitchConfigs SoftwareLimitSwitch
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:166
CustomParamsConfigs CustomParams
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:180
VoltageConfigs Voltage
Voltage-specific configs.
Definition: CoreTalonFX.hpp:117
AudioConfigs Audio
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:159
ClosedLoopRampsConfigs ClosedLoopRamps
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:145
HardwareLimitSwitchConfigs HardwareLimitSwitch
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:152
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Take a string and deserialize it to this configuration.
Definition: CoreTalonFX.hpp:242
std::string ToString() const
Get the string representation of this configuration.
Definition: CoreTalonFX.hpp:192
CurrentLimitsConfigs CurrentLimits
Configs that directly affect current limiting features.
Definition: CoreTalonFX.hpp:110
Slot0Configs Slot0
What the gains for slot 0 are.
Definition: CoreTalonFX.hpp:80
Slot1Configs Slot1
What the gains for slot 1 are.
Definition: CoreTalonFX.hpp:88
MotorOutputConfigs MotorOutput
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:103
MotionMagicConfigs MotionMagic
Configs that directly affect motor-output.
Definition: CoreTalonFX.hpp:173
std::string Serialize() const
Get the serialized form of this configuration.
Definition: CoreTalonFX.hpp:217
Slot2Configs Slot2
What the gains for slot 2 are.
Definition: CoreTalonFX.hpp:96
bool FutureProofConfigs
True if we should factory default newer unsupported configs, false to leave newer unsupported configs...
Definition: CoreTalonFX.hpp:71
Class description for the Talon FX integrated motor controller that runs on associated Falcon motors.
Definition: CoreTalonFX.hpp:272
ctre::phoenix::StatusCode Apply(const Slot0Configs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:388
ctre::phoenix::StatusCode Refresh(TalonFXConfiguration &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:295
ctre::phoenix::StatusCode Apply(const CurrentLimitsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:642
ctre::phoenix::StatusCode Apply(const OpenLoopRampsConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:868
ctre::phoenix::StatusCode Apply(const SoftwareLimitSwitchConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1108
ctre::phoenix::StatusCode Apply(const Slot2Configs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:522
ctre::phoenix::StatusCode Refresh(Slot1Configs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:430
ctre::phoenix::StatusCode Apply(const ClosedLoopRampsConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:928
ctre::phoenix::StatusCode Refresh(CurrentLimitsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:610
ctre::phoenix::StatusCode Refresh(SoftwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1090
ctre::phoenix::StatusCode Refresh(Slot2Configs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:490
ctre::phoenix::StatusCode Apply(const ClosedLoopRampsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:942
ctre::phoenix::StatusCode Refresh(FeedbackConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:790
ctre::phoenix::StatusCode Refresh(TalonFXConfiguration &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:309
ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1210
TalonFXConfigurator(const TalonFXConfigurator &)=delete
Delete the copy constructor, we can only pass by reference.
ctre::phoenix::StatusCode Apply(const MotionMagicConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1168
ctre::phoenix::StatusCode SetRotorPosition(units::angle::turn_t newValue)
The position to set the rotor position to right now.
Definition: CoreTalonFX.hpp:1322
ctre::phoenix::StatusCode Apply(const TalonFXConfiguration &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:341
ctre::phoenix::StatusCode Apply(const Slot1Configs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:462
ctre::phoenix::StatusCode Refresh(SoftwareLimitSwitchConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1077
ctre::phoenix::StatusCode Refresh(AudioConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1017
ctre::phoenix::StatusCode Apply(const TorqueCurrentConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:762
ctre::phoenix::StatusCode Refresh(FeedbackConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:777
ctre::phoenix::StatusCode Apply(const CurrentLimitsConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:628
ctre::phoenix::StatusCode Apply(const AudioConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1048
ctre::phoenix::StatusCode Apply(const Slot0Configs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:402
ctre::phoenix::StatusCode Refresh(AudioConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1030
ctre::phoenix::StatusCode Refresh(Slot1Configs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:417
ctre::phoenix::StatusCode Refresh(Slot2Configs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:477
ctre::phoenix::StatusCode Refresh(ClosedLoopRampsConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:897
ctre::phoenix::StatusCode Refresh(CustomParamsConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1197
ctre::phoenix::StatusCode Refresh(CurrentLimitsConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:597
ctre::phoenix::StatusCode Apply(const VoltageConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:702
ctre::phoenix::StatusCode Refresh(TorqueCurrentConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:717
ctre::phoenix::StatusCode Refresh(OpenLoopRampsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:850
ctre::phoenix::StatusCode Refresh(OpenLoopRampsConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:837
ctre::phoenix::StatusCode Refresh(MotorOutputConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:550
ctre::phoenix::StatusCode Apply(const ClosedLoopGeneralConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1302
ctre::phoenix::StatusCode Apply(const MotorOutputConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:568
ctre::phoenix::StatusCode Apply(const MotionMagicConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1182
ctre::phoenix::StatusCode Apply(const VoltageConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:688
ctre::phoenix::StatusCode Apply(const FeedbackConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:808
ctre::phoenix::StatusCode Apply(const OpenLoopRampsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:882
ctre::phoenix::StatusCode Refresh(MotionMagicConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1137
ctre::phoenix::StatusCode Apply(const FeedbackConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:822
ctre::phoenix::StatusCode Apply(const Slot1Configs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:448
ctre::phoenix::StatusCode ClearStickyFaults()
Clear the sticky faults in the device.
Definition: CoreTalonFX.hpp:1363
ctre::phoenix::StatusCode Apply(const ClosedLoopGeneralConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1288
ctre::phoenix::StatusCode Apply(const HardwareLimitSwitchConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:988
ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1242
ctre::phoenix::StatusCode SetRotorPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
The position to set the rotor position to right now.
Definition: CoreTalonFX.hpp:1339
ctre::phoenix::StatusCode Refresh(ClosedLoopGeneralConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1270
ctre::phoenix::StatusCode Refresh(ClosedLoopGeneralConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1257
ctre::phoenix::StatusCode Refresh(ClosedLoopRampsConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:910
ctre::phoenix::StatusCode Apply(const Slot2Configs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:508
ctre::phoenix::StatusCode Refresh(VoltageConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:670
ctre::phoenix::StatusCode Apply(const TalonFXConfiguration &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:327
ctre::phoenix::StatusCode Refresh(Slot0Configs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:357
ctre::phoenix::StatusCode Apply(const AudioConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1062
ctre::phoenix::StatusCode Refresh(MotorOutputConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:537
ctre::phoenix::StatusCode Refresh(VoltageConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:657
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
Clear the sticky faults in the device.
Definition: CoreTalonFX.hpp:1382
ctre::phoenix::StatusCode Refresh(TorqueCurrentConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:730
ctre::phoenix::StatusCode Apply(const MotorOutputConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:582
ctre::phoenix::StatusCode Apply(const CustomParamsConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1228
ctre::phoenix::StatusCode Apply(const SoftwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1122
ctre::phoenix::StatusCode Apply(const TorqueCurrentConfigs &configs)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:748
ctre::phoenix::StatusCode Apply(const HardwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds)
Applies the contents of the specified config to the device.
Definition: CoreTalonFX.hpp:1002
ctre::phoenix::StatusCode Refresh(HardwareLimitSwitchConfigs &configs) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:957
ctre::phoenix::StatusCode Refresh(Slot0Configs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:370
ctre::phoenix::StatusCode Refresh(HardwareLimitSwitchConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:970
ctre::phoenix::StatusCode Refresh(MotionMagicConfigs &configs, units::time::second_t timeoutSeconds) const
Refreshes the values of the specified config group.
Definition: CoreTalonFX.hpp:1150
Configs that directly affect motor-output.
Definition: Configs.hpp:995
std::string Serialize() const
Definition: Configs.hpp:1040
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:1050
std::string ToString() const
Definition: Configs.hpp:1028
Voltage-specific configs.
Definition: Configs.hpp:920
ctre::phoenix::StatusCode Deserialize(const std::string &string)
Definition: Configs.hpp:977
std::string Serialize() const
Definition: Configs.hpp:967
std::string ToString() const
Definition: Configs.hpp:955
Request coast neutral output of actuator.
Definition: CoastOut.hpp:27
Abstract Control Request class that other control requests extend for use.
Definition: ControlRequest.hpp:65
Request a specified motor duty cycle.
Definition: DutyCycleOut.hpp:28
Follow the motor output of another Talon.
Definition: Follower.hpp:30
Requests Motion Magic® to target a final position using a motion profile.
Definition: MotionMagicDutyCycle.hpp:34
Requests Motion Magic® to target a final position using a motion profile.
Definition: MotionMagicTorqueCurrentFOC.hpp:33
Requests Motion Magic® to target a final position using a motion profile.
Definition: MotionMagicVoltage.hpp:33
Request neutral output of actuator.
Definition: NeutralOut.hpp:27
Request PID to target position with duty cycle feedforward.
Definition: PositionDutyCycle.hpp:30
Request PID to target position with torque current feedforward.
Definition: PositionTorqueCurrentFOC.hpp:30
Request PID to target position with voltage feedforward.
Definition: PositionVoltage.hpp:30
Applies full neutral-brake by shorting motor leads together.
Definition: StaticBrake.hpp:26
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition: StrictFollower.hpp:32
Request a specified motor current (field oriented control).
Definition: TorqueCurrentFOC.hpp:31
Request PID to target velocity with duty cycle feedforward.
Definition: VelocityDutyCycle.hpp:30
Request PID to target velocity with torque current feedforward.
Definition: VelocityTorqueCurrentFOC.hpp:30
Request PID to target velocity with voltage feedforward.
Definition: VelocityVoltage.hpp:30
Request a specified voltage.
Definition: VoltageOut.hpp:29
Definition: DeviceIdentifier.hpp:19
Parent class for all devices.
Definition: ParentDevice.hpp:30
Class description for the Talon FX integrated motor controller that runs on associated Falcon motors.
Definition: CoreTalonFX.hpp:1401
ctre::phoenix::StatusCode ClearStickyFaults(units::time::second_t timeoutSeconds)
Clear the sticky faults in the device.
Definition: CoreTalonFX.hpp:3819
StatusSignalValue< units::angular_velocity::turns_per_second_t > & GetVelocity()
Velocity of device.
StatusSignalValue< units::temperature::celsius_t > & GetDeviceTemp()
Temperature of device.
StatusSignalValue< bool > & GetStickyFault_MissingRemoteSensor()
The remote sensor is not present on CAN Bus.
StatusSignalValue< bool > & GetFault_FusedSensorOutOfSync()
The remote sensor used for fusion has fallen out of sync to the local sensor.
StatusSignalValue< double > & GetClosedLoopFeedForward()
Feed Forward passed by the user.
ctre::phoenix::StatusCode SetControl(controls::NeutralOut &request)
Request neutral output of actuator.
StatusSignalValue< double > & GetClosedLoopReference()
Value that the closed loop is targeting.
ctre::phoenix::StatusCode SetControl(controls::VelocityTorqueCurrentFOC &request)
Request PID to target velocity with torque current feedforward.
StatusSignalValue< bool > & GetFault_DeviceTemp()
Device temperature exceeded limit.
StatusSignalValue< bool > & GetStickyFault_FusedSensorOutOfSync()
The remote sensor used for fusion has fallen out of sync to the local sensor.
StatusSignalValue< bool > & GetFault_ReverseHardLimit()
Reverse limit switch has been asserted.
StatusSignalValue< bool > & GetFault_ForwardSoftLimit()
Forward soft limit has been asserted.
configs::TalonFXConfigurator const & GetConfigurator() const
Gets the configurator for this TalonFX.
Definition: CoreTalonFX.hpp:1790
CoreTalonFX(int deviceId, std::string canbus="")
Constructs a new Talon FX motor controller object.
ctre::phoenix::StatusCode SetControl(controls::VelocityDutyCycle &&request)
Request PID to target velocity with duty cycle feedforward.
Definition: CoreTalonFX.hpp:3186
ctre::phoenix::StatusCode SetControl(controls::PositionDutyCycle &request)
Request PID to target position with duty cycle feedforward.
ctre::phoenix::StatusCode SetControl(controls::StaticBrake &request)
Applies full neutral-brake by shorting motor leads together.
ctre::phoenix::StatusCode SetControl(controls::PositionVoltage &&request)
Request PID to target position with voltage feedforward.
Definition: CoreTalonFX.hpp:3060
ctre::phoenix::StatusCode SetControl(controls::VelocityVoltage &&request)
Request PID to target velocity with voltage feedforward.
Definition: CoreTalonFX.hpp:3256
ctre::phoenix::StatusCode SetControl(controls::CoastOut &&request)
Request coast neutral output of actuator.
Definition: CoreTalonFX.hpp:3678
StatusSignalValue< int > & GetVersionBugfix()
App Bugfix Version number.
ctre::phoenix::StatusCode SetControl(controls::Follower &&request)
Follow the motor output of another Talon.
Definition: CoreTalonFX.hpp:3590
ctre::phoenix::StatusCode SetControl(controls::ControlRequest &request)
Control motor with generic control request object.
Definition: CoreTalonFX.hpp:3714
ctre::phoenix::StatusCode SetControl(controls::PositionTorqueCurrentFOC &&request)
Request PID to target position with torque current feedforward.
Definition: CoreTalonFX.hpp:3116
StatusSignalValue< bool > & GetFault_ProcTemp()
Processor temperature exceeded limit.
StatusSignalValue< int > & GetStickyFaultField()
Integer representing all sticky faults.
ctre::phoenix::StatusCode SetControl(controls::VelocityDutyCycle &request)
Request PID to target velocity with duty cycle feedforward.
StatusSignalValue< units::current::ampere_t > & GetStatorCurrent()
Current corresponding to the stator windings.
ctre::phoenix::StatusCode SetControl(controls::VoltageOut &&request)
Request a specified voltage.
Definition: CoreTalonFX.hpp:2920
ctre::phoenix::StatusCode SetControl(controls::PositionDutyCycle &&request)
Request PID to target position with duty cycle feedforward.
Definition: CoreTalonFX.hpp:2990
ctre::phoenix::StatusCode SetControl(controls::VelocityTorqueCurrentFOC &&request)
Request PID to target velocity with torque current feedforward.
Definition: CoreTalonFX.hpp:3312
StatusSignalValue< units::current::ampere_t > & GetTorqueCurrent()
Current corresponding to the torque output by the motor.
StatusSignalValue< double > & GetClosedLoopIntegratedOutput()
Closed loop integrated component.
ctre::phoenix::StatusCode SetControl(controls::VelocityVoltage &request)
Request PID to target velocity with voltage feedforward.
StatusSignalValue< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity()
The applied rotor polarity.
StatusSignalValue< bool > & GetStickyFault_Hardware()
Hardware fault occurred.
StatusSignalValue< bool > & GetStickyFault_OverSupplyV()
Supply Voltage has exceeded the maximum voltage rating of device.
ctre::phoenix::StatusCode SetControl(controls::StrictFollower &request)
Follow the motor output of another Talon while ignoring the master's invert setting.
StatusSignalValue< bool > & GetFault_StatorCurrLimit()
Stator current limit occured.
StatusSignalValue< bool > & GetFault_MissingRemoteSensor()
The remote sensor is not present on CAN Bus.
StatusSignalValue< double > & GetClosedLoopError()
The difference between target reference and current measurement.
StatusSignalValue< signals::ControlModeValue > & GetControlMode()
The active control mode of the motor controller.
ctre::phoenix::StatusCode SetControl(controls::MotionMagicDutyCycle &&request)
Requests Motion Magic® to target a final position using a motion profile.
Definition: CoreTalonFX.hpp:3394
StatusSignalValue< double > & GetClosedLoopReferenceSlope()
Derivative of the target that the closed loop is targeting.
StatusSignalValue< bool > & GetFault_UnstableSupplyV()
Supply Voltage is unstable.
StatusSignalValue< bool > & GetStickyFault_ReverseHardLimit()
Reverse limit switch has been asserted.
CoreTalonFX & operator=(CoreTalonFX const &)=delete
StatusSignalValue< int > & GetVersionMajor()
App Major Version number.
StatusSignalValue< units::angle::turn_t > & GetPosition()
Position of device.
StatusSignalValue< double > & GetClosedLoopProportionalOutput()
Closed loop proportional component.
ctre::phoenix::StatusCode SetControl(controls::DutyCycleOut &&request)
Request a specified motor duty cycle.
Definition: CoreTalonFX.hpp:2784
ctre::phoenix::StatusCode SetRotorPosition(units::angle::turn_t newValue, units::time::second_t timeoutSeconds)
The position to set the rotor position to right now.
Definition: CoreTalonFX.hpp:3793
StatusSignalValue< bool > & GetFault_ReverseSoftLimit()
Reverse soft limit has been asserted.
StatusSignalValue< bool > & GetFault_ForwardHardLimit()
Forward limit switch has been asserted.
CoreTalonFX(CoreTalonFX const &)=delete
ctre::phoenix::StatusCode SetControl(controls::StaticBrake &&request)
Applies full neutral-brake by shorting motor leads together.
Definition: CoreTalonFX.hpp:3700
ctre::phoenix::StatusCode SetRotorPosition(units::angle::turn_t newValue)
The position to set the rotor position to right now.
Definition: CoreTalonFX.hpp:3805
StatusSignalValue< units::angle::turn_t > & GetRotorPosition()
Position of motor rotor.
StatusSignalValue< int > & GetVersionBuild()
App Build Version number.
StatusSignalValue< bool > & GetStickyFault_SupplyCurrLimit()
Supply current limit occured.
StatusSignalValue< units::temperature::celsius_t > & GetProcessorTemp()
Temperature of the processor.
ctre::phoenix::StatusCode SetControl(controls::StrictFollower &&request)
Follow the motor output of another Talon while ignoring the master's invert setting.
Definition: CoreTalonFX.hpp:3630
ctre::phoenix::StatusCode SetControl(controls::TorqueCurrentFOC &request)
Request a specified motor current (field oriented control).
StatusSignalValue< int > & GetVersionMinor()
App Minor Version number.
StatusSignalValue< units::voltage::volt_t > & GetSupplyVoltage()
Measured supply voltage to the TalonFX.
ctre::phoenix::StatusCode SetControl(controls::TorqueCurrentFOC &&request)
Request a specified motor current (field oriented control).
Definition: CoreTalonFX.hpp:2858
ctre::phoenix::StatusCode SetControl(controls::NeutralOut &&request)
Request neutral output of actuator.
Definition: CoreTalonFX.hpp:3654
ctre::phoenix::StatusCode SetControl(controls::MotionMagicTorqueCurrentFOC &request)
Requests Motion Magic® to target a final position using a motion profile.
StatusSignalValue< units::current::ampere_t > & GetSupplyCurrent()
Measured supply side current.
configs::TalonFXConfigurator & GetConfigurator()
Gets the configurator for this TalonFX.
Definition: CoreTalonFX.hpp:1778
ctre::phoenix::StatusCode SetControl(controls::MotionMagicVoltage &request)
Requests Motion Magic® to target a final position using a motion profile.
sim::TalonFXSimState & GetSimState()
Get the simulation state for this device.
Definition: CoreTalonFX.hpp:1808
StatusSignalValue< units::dimensionless::scalar_t > & GetDutyCycle()
The applied motor duty cycle.
ctre::phoenix::StatusCode SetControl(controls::CoastOut &request)
Request coast neutral output of actuator.
StatusSignalValue< int > & GetFaultField()
Integer representing all faults.
StatusSignalValue< bool > & GetStickyFault_DeviceTemp()
Device temperature exceeded limit.
StatusSignalValue< bool > & GetStickyFault_Undervoltage()
Device supply voltage dropped to near brownout levels.
ctre::phoenix::StatusCode SetControl(controls::PositionTorqueCurrentFOC &request)
Request PID to target position with torque current feedforward.
StatusSignalValue< double > & GetClosedLoopDerivativeOutput()
Closed loop derivative component.
ctre::phoenix::StatusCode SetControl(controls::MotionMagicDutyCycle &request)
Requests Motion Magic® to target a final position using a motion profile.
StatusSignalValue< bool > & GetStickyFault_ForwardHardLimit()
Forward limit switch has been asserted.
StatusSignalValue< bool > & GetStickyFault_BootDuringEnable()
Device boot while detecting the enable signal.
StatusSignalValue< bool > & GetFault_Undervoltage()
Device supply voltage dropped to near brownout levels.
StatusSignalValue< bool > & GetStickyFault_ReverseSoftLimit()
Reverse soft limit has been asserted.
ctre::phoenix::StatusCode SetControl(controls::MotionMagicTorqueCurrentFOC &&request)
Requests Motion Magic® to target a final position using a motion profile.
Definition: CoreTalonFX.hpp:3540
StatusSignalValue< bool > & GetFault_Hardware()
Hardware fault occurred.
StatusSignalValue< signals::ForwardLimitValue > & GetForwardLimit()
Forward Limit Pin.
StatusSignalValue< signals::DeviceEnableValue > & GetDeviceEnable()
Indicates if device is actuator enabled.
StatusSignalValue< signals::MotionMagicIsRunningValue > & GetMotionMagicIsRunning()
Check if Motion Magic® is running.
StatusSignalValue< bool > & GetFault_BootDuringEnable()
Device boot while detecting the enable signal.
StatusSignalValue< bool > & GetStickyFault_ProcTemp()
Processor temperature exceeded limit.
StatusSignalValue< bool > & GetStickyFault_StatorCurrLimit()
Stator current limit occured.
StatusSignalValue< int > & GetVersion()
Full Version.
StatusSignalValue< units::angular_velocity::turns_per_second_t > & GetRotorVelocity()
Velocity of motor rotor.
ctre::phoenix::StatusCode SetControl(controls::MotionMagicVoltage &&request)
Requests Motion Magic® to target a final position using a motion profile.
Definition: CoreTalonFX.hpp:3474
ctre::phoenix::StatusCode SetControl(controls::Follower &request)
Follow the motor output of another Talon.
ctre::phoenix::StatusCode SetControl(controls::ControlRequest &&request)
Control motor with generic control request object.
Definition: CoreTalonFX.hpp:3780
StatusSignalValue< bool > & GetStickyFault_ForwardSoftLimit()
Forward soft limit has been asserted.
StatusSignalValue< bool > & GetFault_OverSupplyV()
Supply Voltage has exceeded the maximum voltage rating of device.
StatusSignalValue< double > & GetClosedLoopOutput()
Closed loop total output.
StatusSignalValue< signals::ReverseLimitValue > & GetReverseLimit()
Reverse Limit Pin.
ctre::phoenix::StatusCode ClearStickyFaults()
Clear the sticky faults in the device.
Definition: CoreTalonFX.hpp:3833
StatusSignalValue< signals::BridgeOuputValue > & GetBridgeOuput()
The applied output of the bridge.
ctre::phoenix::StatusCode SetControl(controls::DutyCycleOut &request)
Request a specified motor duty cycle.
StatusSignalValue< bool > & GetStickyFault_UnstableSupplyV()
Supply Voltage is unstable.
StatusSignalValue< int > & GetClosedLoopSlot()
Closed loop slot in use.
ctre::phoenix::StatusCode SetControl(controls::VoltageOut &request)
Request a specified voltage.
StatusSignalValue< bool > & GetFault_SupplyCurrLimit()
Supply current limit occured.
ctre::phoenix::StatusCode SetControl(controls::PositionVoltage &request)
Request PID to target position with voltage feedforward.
Class to control the state of a simulated hardware::TalonFX.
Definition: TalonFXSimState.hpp:32
static constexpr int Startup_ResetFlags
Definition: SpnValue.hpp:26
CTREXPORT double GetCurrentTimeSeconds()
Get the current timestamp in seconds.
Definition: string_util.hpp:14