3#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
5#pragma warning (disable : 4250)
18 namespace motorcontrol {
33 struct [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
34 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
35 "A migration guide is available at https:
90 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
91 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
92 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
114 retstr += prependString +
".motorCommutation = " + std::to_string((
int)
motorCommutation) +
";\n";
115 retstr += prependString +
".absoluteSensorRange = " + std::to_string(
absoluteSensorRange) +
";\n";
136 class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
137 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
138 "A migration guide is available at https:
149 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
150 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
151 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
153 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
154 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
155 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
157 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
158 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
159 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
161 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
162 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
163 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
165 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
166 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
167 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
169 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
170 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
171 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
215 class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
216 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
217 "A migration guide is available at https:
229 TalonFX(
int deviceNumber, std::string
const &canbus =
"");
253 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
254 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
255 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
295 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
296 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
297 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
314 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
315 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
316 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
332 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
333 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
334 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
346 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
347 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
348 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
359 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
360 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
361 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
371 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
372 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
373 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
383 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
384 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
385 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
392 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
393 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
394 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
401 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
402 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
403 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
418 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
419 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
420 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
432 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
433 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
434 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
448 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
449 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
450 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
461 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
462 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
463 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
475 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
476 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
477 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
485 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
486 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
487 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
502 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
503 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
504 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
535 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
536 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
537 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
545 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
546 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
547 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
549 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
550 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
551 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
561#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
Collection of sensors available to the Talon FX.
Definition: TalonFXSensorCollection.h:40
Collection of simulation commands available to a TalonFX motor controller.
Definition: TalonFXSimCollection.h:35
Util class to help with talon configs.
Definition: BaseTalon.h:230
CTRE Talon SRX Motor Controller when used on CAN Bus.
Definition: BaseTalon.h:267
Util class to help with talon configs.
Definition: TalonFX.h:139
static bool InitializationStrategyDifferent(const TalonFXConfiguration &settings)
Definition: TalonFX.h:172
static bool StatorCurrentDurationDifferent(const TalonFXConfiguration &settings)
Definition: TalonFX.h:156
static bool IntegratedSensorOffsetDegreesDifferent(const TalonFXConfiguration &settings)
Definition: TalonFX.h:168
static bool SupplyCurrentLimitDifferent(const TalonFXConfiguration &settings)
Determine if specified value is different from default.
Definition: TalonFX.h:152
static bool AbsoluteSensorRangeDifferent(const TalonFXConfiguration &settings)
Definition: TalonFX.h:164
static bool MotorCommutationDifferent(const TalonFXConfiguration &settings)
Definition: TalonFX.h:160
CTRE Talon FX Motor Controller when used on CAN Bus.
Definition: TalonFX.h:219
ctre::phoenix::ErrorCode ConfigGetSupplyCurrentLimit(ctre::phoenix::motorcontrol::SupplyCurrentLimitConfiguration &currLimitConfigsToFill, int timeoutMs=50)
Gets the supply current limit configuration.
ctre::phoenix::motorcontrol::TalonFXSimCollection & GetSimCollection()
ErrorCode ConfigIntegratedSensorInitializationStrategy(ctre::phoenix::sensors::SensorInitializationStrategy initializationStrategy, int timeoutMs=0)
Pick the strategy on how to initialize the integrated sensor absolute position register.
ErrorCode ConfigIntegratedSensorOffset(double offsetDegrees, int timeoutMs=0)
Adjusts the zero point for the absolute position register.
void Set(TalonFXControlMode mode, double demand0, DemandType demand1Type, double demand1)
ctre::phoenix::ErrorCode ConfigAllSettings(const TalonFXConfiguration &allConfigs, int timeoutMs=50)
Configures all persistent settings.
void GetAllConfigs(TalonFXConfiguration &allConfigs, int timeoutMs=50)
Gets all persistant settings.
ErrorCode ConfigIntegratedSensorAbsoluteRange(ctre::phoenix::sensors::AbsoluteSensorRange absoluteSensorRange, int timeoutMs=0)
Sets the signage and range of the "Absolute Position" signal.
ctre::phoenix::ErrorCode ConfigStatorCurrentLimit(const ctre::phoenix::motorcontrol::StatorCurrentLimitConfiguration &currLimitConfigs, int timeoutMs=50)
Configures the stator (output) current limit.
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor(RemoteFeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
Select the remote feedback device for the motor controller.
virtual void SetInverted(bool bInvert)
Inverts the hbridge output of the motor controller.
TalonFX & operator=(TalonFX const &)=delete
TalonFX(int deviceNumber, std::string const &canbus="")
Constructor for a Talon.
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor(FeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
Select the remote feedback device for the motor controller.
void GetPIDConfigs(TalonFXPIDSetConfiguration &pid, int pidIdx=0, int timeoutMs=50)
Gets all PID set persistant settings.
ctre::phoenix::ErrorCode ConfigGetStatorCurrentLimit(ctre::phoenix::motorcontrol::StatorCurrentLimitConfiguration &currLimitConfigsToFill, int timeoutMs=50)
Gets the stator (output) current limit configuration.
virtual void Set(ControlMode mode, double demand0, DemandType demand1Type, double demand1)
TalonFX(TalonFX const &)=delete
void SetInverted(TalonFXInvertType invertType)
Inverts the hbridge output of the motor controller in relation to the master if present.
void Set(TalonFXControlMode mode, double value)
Sets the appropriate output on the talon, depending on the mode.
virtual void Set(ControlMode mode, double value)
Sets the appropriate output on the talon, depending on the mode.
ctre::phoenix::ErrorCode ConfigSupplyCurrentLimit(const ctre::phoenix::motorcontrol::SupplyCurrentLimitConfiguration &currLimitConfigs, int timeoutMs=50)
Configures the supply-side current limit.
ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor(TalonFXFeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
Select the feedback device for the motor controller.
ctre::phoenix::ErrorCode ConfigMotorCommutation(ctre::phoenix::motorcontrol::MotorCommutation motorCommutation, int timeoutMs=0)
Configure the motor commutation type.
ctre::phoenix::ErrorCode ConfigGetMotorCommutation(ctre::phoenix::motorcontrol::MotorCommutation &motorCommutation, int timeoutMs=0)
ctre::phoenix::ErrorCode ConfigurePID(const TalonFXPIDSetConfiguration &pid, int pidIdx=0, int timeoutMs=50)
Sets all PID persistant settings.
virtual void SetInverted(InvertType invertType)
Inverts the hbridge output of the motor controller in relation to the master if present.
ctre::phoenix::motorcontrol::TalonFXSensorCollection & GetSensorCollection()
ControlMode
Choose the control mode for a motor controller.
Definition: ControlMode.h:11
DemandType
How to interpret a demand value.
Definition: DemandType.h:10
InvertType
Choose the invert type of the motor controller.
Definition: InvertType.h:14
TalonFXFeedbackDevice
Choose the feedback device for a Talon FX/Falcon 500.
Definition: FeedbackDevice.h:144
MotorCommutation
Choose the type of motor commutation.
Definition: MotorCommutation.h:20
@ Trapezoidal
Trapezoidal Commutation.
RemoteFeedbackDevice
Choose the remote feedback device for a motor controller.
Definition: FeedbackDevice.h:179
FeedbackDevice
Choose the feedback device for a motor controller.
Definition: FeedbackDevice.h:14
@ IntegratedSensor
TalonFX supports an integrated sensor.
TalonFXControlMode
Choose the control mode for a TalonFX / Falcon 500.
Definition: ControlMode.h:68
TalonFXInvertType
Choose the invert type for a Talon FX based integrated motor controller.
Definition: InvertType.h:37
SensorInitializationStrategy
Enum for how CANCoder should initialize its position register on boot.
Definition: SensorInitializationStrategy.h:22
@ BootToZero
On boot up, set position to zero.
Definition: SensorInitializationStrategy.h:26
AbsoluteSensorRange
Enum for how to range the absolute sensor position.
Definition: AbsoluteSensorRange.h:22
@ Unsigned_0_to_360
Express the absolute position as an unsigned value.
Definition: AbsoluteSensorRange.h:27
ErrorCode
Definition: ErrorCode.h:13
namespace ctre
Definition: paramEnum.h:5
bool enableOptimizations
Enable optimizations for ConfigAll (defaults true)
Definition: CustomParamConfiguration.h:23
Describes the desired stator current limiting behavior.
Definition: StatorCurrentLimitConfiguration.h:22
bool Equals(const StatorCurrentLimitConfiguration &rhs) const
Definition: StatorCurrentLimitConfiguration.h:109
std::string ToString() const
Definition: StatorCurrentLimitConfiguration.h:62
Describes the desired stator current limiting behavior.
Definition: SupplyCurrentLimitConfiguration.h:13
std::string ToString() const
Definition: SupplyCurrentLimitConfiguration.h:53
bool Equals(const SupplyCurrentLimitConfiguration &rhs) const
Definition: SupplyCurrentLimitConfiguration.h:100
Configurables available to BaseTalon.
Definition: BaseTalon.h:96
std::string toString()
Definition: BaseTalon.h:197
Configurables available to BaseTalon's PID.
Definition: BaseTalon.h:34
Configurables available to TalonFX.
Definition: TalonFX.h:50
ctre::phoenix::motorcontrol::MotorCommutation motorCommutation
Choose the type of motor commutation.
Definition: TalonFX.h:64
std::string toString(std::string prependString)
Definition: TalonFX.h:109
ctre::phoenix::sensors::SensorInitializationStrategy initializationStrategy
The sensor initialization strategy to use.This will impact the behavior the next time device boots up...
Definition: TalonFX.h:88
TalonFXConfiguration()
Definition: TalonFX.h:93
double integratedSensorOffsetDegrees
Adjusts the zero point for the absolute position register.
Definition: TalonFX.h:78
ctre::phoenix::sensors::AbsoluteSensorRange absoluteSensorRange
Desired Sign / Range for the absolute position register.
Definition: TalonFX.h:71
SupplyCurrentLimitConfiguration supplyCurrLimit
Supply-side current limiting.
Definition: TalonFX.h:55
std::string toString()
Definition: TalonFX.h:100
StatorCurrentLimitConfiguration statorCurrLimit
Stator-side current limiting.
Definition: TalonFX.h:59
Configurables available to TalonFX's PID.
Definition: TalonFX.h:36