16#include "ctre/phoenix/platform/Platform.hpp"
23 #pragma warning(disable : 4250)
28namespace motorcontrol {
43class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
44 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
45 "A migration guide is available at https:
56 WPI_TalonFX(
int deviceNumber, std::string
const &canbus =
"");
64 virtual void Set(
double value);
65 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
66 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
67 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
69 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
70 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
71 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
73 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
74 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
75 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
77 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
78 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
79 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
82 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
83 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
84 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
86 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
87 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
88 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
91 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
92 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
93 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
95 [[deprecated(
"This device's Phoenix 5 API is deprecated for removal in the 2025 season."
96 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
97 "A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html")]]
104 hal::SimDevice m_simMotor;
105 hal::SimDouble m_simPercOut;
106 hal::SimDouble m_simMotorOutputLeadVoltage;
107 hal::SimDouble m_simSupplyCurrent;
108 hal::SimDouble m_simMotorCurrent;
109 hal::SimDouble m_simVbat;
111 hal::SimDevice m_simIntegSens;
112 hal::SimDouble m_simIntegSensPos;
113 hal::SimDouble m_simIntegSensAbsPos;
114 hal::SimDouble m_simIntegSensRawPos;
115 hal::SimDouble m_simIntegSensVel;
117 hal::SimDevice m_simFwdLim;
118 hal::SimBoolean m_simFwdLimInit;
119 hal::SimBoolean m_simFwdLimInput;
120 hal::SimBoolean m_simFwdLimValue;
122 hal::SimDevice m_simRevLim;
123 hal::SimBoolean m_simRevLimInit;
124 hal::SimBoolean m_simRevLimInput;
125 hal::SimBoolean m_simRevLimValue;
127 static void OnValueChanged(
const char* name,
void* param, HAL_SimValueHandle handle,
128 HAL_Bool readonly,
const struct HAL_Value* value);
129 static void OnPeriodic(
void* param);
CTRE Talon FX Motor Controller when used on CAN Bus.
Definition: TalonFX.h:219
VEX Victor SPX Motor Controller when used on CAN Bus.
Definition: WPI_BaseMotorController.h:57
CTRE Talon FX Motor Controller when used on CAN Bus.
Definition: WPI_TalonFX.h:48
WPI_TalonFX(int deviceNumber, std::string const &canbus="")
Constructor for a WPI_TalonFX.
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor(FeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
Select the remote feedback device for the motor controller.
virtual void Set(TalonFXControlMode mode, double value)
virtual void Set(ControlMode mode, double value)
Sets the appropriate output on the talon, depending on the mode.
virtual void SetInverted(InvertType invertType)
Inverts the hbridge output of the motor controller in relation to the master if present.
virtual void Set(ControlMode mode, double demand0, DemandType demand1Type, double demand1)
virtual void SetInverted(TalonFXInvertType invertType)
virtual void Set(double value)
Common interface for setting the speed of a simple speed controller.
virtual void SetVoltage(units::volt_t output)
Sets the voltage output of the SpeedController.
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor(RemoteFeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
Select the remote feedback device for the motor controller.
virtual void Set(TalonFXControlMode mode, double demand0, DemandType demand1Type, double demand1)
WPI_TalonFX & operator=(WPI_TalonFX const &)=delete
WPI_TalonFX(WPI_TalonFX const &)=delete
virtual void SetInverted(bool bInvert)
Inverts the hbridge output of the motor controller.
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
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
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
ErrorCode
Definition: ErrorCode.h:13
namespace ctre
Definition: paramEnum.h:5