16#include "ctre/phoenix/platform/Platform.hpp"
23 #pragma warning(disable : 4250)
30namespace motorcontrol {
52 virtual void Set(
double value);
66 hal::SimDevice m_simMotor;
67 hal::SimDouble m_simPercOut;
68 hal::SimDouble m_simMotorOutputLeadVoltage;
69 hal::SimDouble m_simSupplyCurrent;
70 hal::SimDouble m_simMotorCurrent;
71 hal::SimDouble m_simVbat;
73 hal::SimDevice m_simAnalogEnc;
74 hal::SimBoolean m_simAnalogInit;
75 hal::SimDouble m_simAnalogVoltage;
77 hal::SimDevice m_simPulseWidthEnc;
78 hal::SimBoolean m_simPulseWidthConnected;
79 hal::SimDouble m_simPulseWidthPos;
81 hal::SimDevice m_simQuadEnc;
82 hal::SimDouble m_simQuadPos;
83 hal::SimDouble m_simQuadRawPos;
84 hal::SimDouble m_simQuadVel;
86 hal::SimDevice m_simFwdLim;
87 hal::SimBoolean m_simFwdLimInit;
88 hal::SimBoolean m_simFwdLimInput;
89 hal::SimBoolean m_simFwdLimValue;
91 hal::SimDevice m_simRevLim;
92 hal::SimBoolean m_simRevLimInit;
93 hal::SimBoolean m_simRevLimInput;
94 hal::SimBoolean m_simRevLimValue;
96 static void OnValueChanged(
const char* name,
void* param, HAL_SimValueHandle handle,
97 HAL_Bool readonly,
const struct HAL_Value* value);
98 static void OnPeriodic(
void* param);
CTRE Talon SRX Motor Controller when used on CAN Bus.
Definition TalonSRX.h:145
VEX Victor SPX Motor Controller when used on CAN Bus.
Definition WPI_BaseMotorController.h:57
CTRE Talon SRX Motor Controller when used on CAN Bus.
Definition WPI_TalonSRX.h:38
WPI_TalonSRX(int deviceNumber)
Constructor for a WPI_TalonSRX.
virtual void Set(ControlMode mode, double value)
Sets the appropriate output on the talon, depending on the mode.
virtual void Set(ControlMode mode, double demand0, DemandType demand1Type, double demand1)
virtual void Set(double value)
Common interface for setting the speed of a simple speed controller.
virtual void Set(TalonSRXControlMode mode, double value)
WPI_TalonSRX & operator=(WPI_TalonSRX const &)=delete
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(InvertType invertType)
Inverts the hbridge output of the motor controller in relation to the master if present.
virtual void SetInverted(bool bInvert)
Inverts the hbridge output of the motor controller.
WPI_TalonSRX(WPI_TalonSRX const &)=delete
virtual void Set(TalonSRXControlMode mode, double demand0, DemandType demand1Type, double demand1)
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor(FeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
Select the feedback device for the motor controller.
virtual void SetVoltage(units::volt_t output)
Sets the voltage output of the SpeedController.
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:131
FeedbackDevice
Choose the feedback device for a motor controller.
Definition FeedbackDevice.h:14
TalonSRXControlMode
Choose the control mode for a Talon SRX.
Definition ControlMode.h:57
namespace phoenix
Definition CANCoderStatusFrame.h:5
ErrorCode
Definition ErrorCode.h:13
WPI Compliant CANcoder class.
Definition CANCoderStatusFrame.h:4