CTRE_Phoenix  5.19.4
ctre::phoenix::motorcontrol::can::WPI_TalonSRX Class Reference

#include <WPI_TalonSRX.h>

Inherits ctre::phoenix::motorcontrol::can::TalonSRX, and ctre::phoenix::motorcontrol::can::WPI_BaseMotorController.

Public Member Functions

 WPI_TalonSRX (int deviceNumber)
 
 WPI_TalonSRX (WPI_TalonSRX const &)=delete
 
WPI_TalonSRXoperator= (WPI_TalonSRX const &)=delete
 
virtual void Set (double value)
 
virtual void Set (ControlMode mode, double value)
 
virtual void Set (ControlMode mode, double demand0, DemandType demand1Type, double demand1)
 
virtual void Set (TalonSRXControlMode mode, double value)
 
virtual void Set (TalonSRXControlMode mode, double demand0, DemandType demand1Type, double demand1)
 
virtual void SetVoltage (units::volt_t output)
 
virtual void SetInverted (InvertType invertType)
 
virtual void SetInverted (bool bInvert)
 
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor (FeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor (RemoteFeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
 
- Public Member Functions inherited from ctre::phoenix::motorcontrol::can::TalonSRX
 TalonSRX (int deviceNumber)
 
 TalonSRX (TalonSRX const &)=delete
 
TalonSRXoperator= (TalonSRX const &)=delete
 
void Set (TalonSRXControlMode mode, double value)
 
void Set (TalonSRXControlMode mode, double demand0, DemandType demand1Type, double demand1)
 
ctre::phoenix::ErrorCode ConfigSelectedFeedbackSensor (TalonSRXFeedbackDevice feedbackDevice, int pidIdx=0, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigSupplyCurrentLimit (const SupplyCurrentLimitConfiguration &currLimitConfigs, int timeoutMs=50)
 
ctre::phoenix::ErrorCode ConfigPeakCurrentLimit (int amps, int timeoutMs=0)
 
ctre::phoenix::ErrorCode ConfigPeakCurrentDuration (int milliseconds, int timeoutMs=0)
 
ctre::phoenix::ErrorCode ConfigContinuousCurrentLimit (int amps, int timeoutMs=0)
 
void EnableCurrentLimit (bool enable)
 
ctre::phoenix::motorcontrol::SensorCollectionGetSensorCollection ()
 
ctre::phoenix::motorcontrol::TalonSRXSimCollectionGetSimCollection ()
 
ctre::phoenix::ErrorCode ConfigurePID (const TalonSRXPIDSetConfiguration &pid, int pidIdx=0, int timeoutMs=50)
 
void GetPIDConfigs (TalonSRXPIDSetConfiguration &pid, int pidIdx=0, int timeoutMs=50)
 
ctre::phoenix::ErrorCode ConfigAllSettings (const TalonSRXConfiguration &allConfigs, int timeoutMs=50)
 
void GetAllConfigs (TalonSRXConfiguration &allConfigs, int timeoutMs=50)
 
- Public Member Functions inherited from ctre::phoenix::motorcontrol::can::BaseTalon
 BaseTalon (int deviceNumber, const char *model)
 
 BaseTalon (BaseTalon const &)=delete
 
BaseTalonoperator= (BaseTalon const &)=delete
 
virtual ctre::phoenix::ErrorCode SetStatusFramePeriod (StatusFrameEnhanced frame, uint8_t periodMs, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode SetStatusFramePeriod (StatusFrame frame, uint8_t periodMs, int timeoutMs=0)
 
virtual int GetStatusFramePeriod (StatusFrameEnhanced frame, int timeoutMs=0)
 
virtual int GetStatusFramePeriod (StatusFrame frame, int timeoutMs=0)
 
virtual double GetOutputCurrent ()
 
double GetStatorCurrent ()
 
double GetSupplyCurrent ()
 
virtual ctre::phoenix::ErrorCode ConfigVelocityMeasurementPeriod (VelocityMeasPeriod period, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigVelocityMeasurementWindow (int windowSize, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigForwardLimitSwitchSource (LimitSwitchSource limitSwitchSource, LimitSwitchNormal normalOpenOrClose, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigForwardLimitSwitchSource (RemoteLimitSwitchSource limitSwitchSource, LimitSwitchNormal normalOpenOrClose, int deviceID, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigReverseLimitSwitchSource (LimitSwitchSource limitSwitchSource, LimitSwitchNormal normalOpenOrClose, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigReverseLimitSwitchSource (RemoteLimitSwitchSource limitSwitchSource, LimitSwitchNormal normalOpenOrClose, int deviceID, int timeoutMs=0)
 
int IsFwdLimitSwitchClosed ()
 
int IsRevLimitSwitchClosed ()
 
- Public Member Functions inherited from ctre::phoenix::motorcontrol::can::BaseMotorController
 BaseMotorController (int deviceNumber, const char *model)
 
 BaseMotorController (BaseMotorController const &)=delete
 
BaseMotorControlleroperator= (BaseMotorController const &)=delete
 
virtual int GetDeviceID ()
 
virtual void NeutralOutput ()
 
virtual void SetNeutralMode (NeutralMode neutralMode)
 
virtual void SetSensorPhase (bool PhaseSensor)
 
virtual ctre::phoenix::ErrorCode ConfigFactoryDefault (int timeoutMs=50)
 
virtual ctre::phoenix::ErrorCode ConfigOpenloopRamp (double secondsFromNeutralToFull, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigClosedloopRamp (double secondsFromNeutralToFull, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigPeakOutputForward (double percentOut, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigPeakOutputReverse (double percentOut, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigNominalOutputForward (double percentOut, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigNominalOutputReverse (double percentOut, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigNeutralDeadband (double percentDeadband, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigVoltageCompSaturation (double voltage, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigVoltageMeasurementFilter (int filterWindowSamples, int timeoutMs=0)
 
virtual void EnableVoltageCompensation (bool enable)
 
virtual bool IsVoltageCompensationEnabled ()
 
virtual double GetBusVoltage ()
 
virtual double GetMotorOutputPercent ()
 
virtual double GetMotorOutputVoltage ()
 
virtual double GetTemperature ()
 
virtual ctre::phoenix::ErrorCode ConfigSelectedFeedbackCoefficient (double coefficient, int pidIdx=0, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigRemoteFeedbackFilter (int deviceID, RemoteSensorSource remoteSensorSource, int remoteOrdinal, int timeoutMs=0)
 
virtual ErrorCode ConfigRemoteFeedbackFilter (ctre::phoenix::sensors::CANCoder &canCoderRef, int remoteOrdinal, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigSensorTerm (SensorTerm sensorTerm, FeedbackDevice feedbackDevice, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigSensorTerm (SensorTerm sensorTerm, RemoteFeedbackDevice feedbackDevice, int timeoutMs=0)
 
virtual double GetSelectedSensorPosition (int pidIdx=0)
 
virtual double GetSelectedSensorVelocity (int pidIdx=0)
 
virtual ctre::phoenix::ErrorCode SetSelectedSensorPosition (double sensorPos, int pidIdx=0, int timeoutMs=50)
 
virtual ctre::phoenix::ErrorCode SetControlFramePeriod (ControlFrame frame, int periodMs)
 
void OverrideLimitSwitchesEnable (bool enable)
 
virtual ctre::phoenix::ErrorCode ConfigForwardSoftLimitThreshold (double forwardSensorLimit, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigReverseSoftLimitThreshold (double reverseSensorLimit, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigForwardSoftLimitEnable (bool enable, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigReverseSoftLimitEnable (bool enable, int timeoutMs=0)
 
virtual void OverrideSoftLimitsEnable (bool enable)
 
virtual ctre::phoenix::ErrorCode Config_kP (int slotIdx, double value, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode Config_kI (int slotIdx, double value, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode Config_kD (int slotIdx, double value, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode Config_kF (int slotIdx, double value, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode Config_IntegralZone (int slotIdx, double izone, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigAllowableClosedloopError (int slotIdx, double allowableCloseLoopError, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigMaxIntegralAccumulator (int slotIdx, double iaccum, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigClosedLoopPeakOutput (int slotIdx, double percentOut, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigClosedLoopPeriod (int slotIdx, int loopTimeMs, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigAuxPIDPolarity (bool invert, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode SetIntegralAccumulator (double iaccum, int pidIdx=0, int timeoutMs=0)
 
virtual double GetClosedLoopError (int pidIdx=0)
 
virtual double GetIntegralAccumulator (int pidIdx=0)
 
virtual double GetErrorDerivative (int pidIdx=0)
 
virtual ctre::phoenix::ErrorCode SelectProfileSlot (int slotIdx, int pidIdx)
 
virtual double GetClosedLoopTarget (int pidIdx=0)
 
virtual double GetActiveTrajectoryPosition (int pidIdx=0)
 
virtual double GetActiveTrajectoryVelocity (int pidIdx=0)
 
virtual double GetActiveTrajectoryArbFeedFwd (int pidIdx=0)
 
virtual ctre::phoenix::ErrorCode ConfigMotionCruiseVelocity (double sensorUnitsPer100ms, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigMotionAcceleration (double sensorUnitsPer100msPerSec, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigMotionSCurveStrength (int curveStrength, int timeoutMs=0)
 
virtual ErrorCode ClearMotionProfileTrajectories ()
 
virtual int GetMotionProfileTopLevelBufferCount ()
 
virtual ctre::phoenix::ErrorCode PushMotionProfileTrajectory (const ctre::phoenix::motion::TrajectoryPoint &trajPt)
 
virtual ctre::phoenix::ErrorCode StartMotionProfile (ctre::phoenix::motion::BufferedTrajectoryPointStream &stream, uint32_t minBufferedPts, ControlMode motionProfControlMode)
 Simple one-shot firing of a complete MP. Starting in 2019, MPs can be fired by building a Buffered Trajectory Point Stream, and calling this routine. More...
 
virtual bool IsMotionProfileFinished ()
 Determine if running MP is complete. This requires using the StartMotionProfile routine to start the MP. That is because managing the trajectory points is now done in a background thread (if StartMotionProfile is called). More...
 
virtual bool IsMotionProfileTopLevelBufferFull ()
 
virtual void ProcessMotionProfileBuffer ()
 
virtual ctre::phoenix::ErrorCode GetMotionProfileStatus (ctre::phoenix::motion::MotionProfileStatus &statusToFill)
 
virtual ctre::phoenix::ErrorCode ClearMotionProfileHasUnderrun (int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ChangeMotionControlFramePeriod (int periodMs)
 
virtual ctre::phoenix::ErrorCode ConfigMotionProfileTrajectoryPeriod (int baseTrajDurationMs, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigMotionProfileTrajectoryInterpolationEnable (bool enable, int timeoutMs=0)
 
virtual ErrorCode ConfigFeedbackNotContinuous (bool feedbackNotContinuous, int timeoutMs=0)
 
virtual ErrorCode ConfigRemoteSensorClosedLoopDisableNeutralOnLOS (bool remoteSensorClosedLoopDisableNeutralOnLOS, int timeoutMs=0)
 
virtual ErrorCode ConfigClearPositionOnLimitF (bool clearPositionOnLimitF, int timeoutMs=0)
 
virtual ErrorCode ConfigClearPositionOnLimitR (bool clearPositionOnLimitR, int timeoutMs=0)
 
virtual ErrorCode ConfigClearPositionOnQuadIdx (bool clearPositionOnQuadIdx, int timeoutMs=0)
 
virtual ErrorCode ConfigLimitSwitchDisableNeutralOnLOS (bool limitSwitchDisableNeutralOnLOS, int timeoutMs=0)
 
virtual ErrorCode ConfigSoftLimitDisableNeutralOnLOS (bool softLimitDisableNeutralOnLOS, int timeoutMs=0)
 
virtual ErrorCode ConfigPulseWidthPeriod_EdgesPerRot (int pulseWidthPeriod_EdgesPerRot, int timeoutMs=0)
 
virtual ErrorCode ConfigPulseWidthPeriod_FilterWindowSz (int pulseWidthPeriod_FilterWindowSz, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode GetLastError ()
 
virtual ctre::phoenix::ErrorCode GetFaults (Faults &toFill)
 
virtual ctre::phoenix::ErrorCode GetStickyFaults (StickyFaults &toFill)
 
virtual ctre::phoenix::ErrorCode ClearStickyFaults (int timeoutMs=0)
 
virtual int GetFirmwareVersion ()
 
virtual bool HasResetOccurred ()
 
virtual ctre::phoenix::ErrorCode ConfigSetCustomParam (int newValue, int paramIndex, int timeoutMs=0)
 
virtual int ConfigGetCustomParam (int paramIndex, int timeoutMs=0)
 
virtual ctre::phoenix::ErrorCode ConfigSetParameter (ctre::phoenix::ParamEnum param, double value, uint8_t subValue, int ordinal, int timeoutMs=0)
 
virtual double ConfigGetParameter (ctre::phoenix::ParamEnum param, int ordinal, int timeoutMs=0)
 
virtual ErrorCode ConfigGetParameter (ParamEnum param, int32_t valueToSend, int32_t &valueReceived, uint8_t &subValue, int32_t ordinal, int32_t timeoutMs)
 
virtual int GetBaseID ()
 
virtual ControlMode GetControlMode ()
 
void Follow (IMotorController &masterToFollow, ctre::phoenix::motorcontrol::FollowerType followerType)
 
virtual void Follow (IMotorController &masterToFollow)
 
virtual void ValueUpdated ()
 
void GetSlotConfigs (SlotConfiguration &slot, int slotIdx=0, int timeoutMs=50)
 
void GetFilterConfigs (FilterConfiguration &Filter, int ordinal=0, int timeoutMs=50)
 
void * GetHandle ()
 
- Public Member Functions inherited from ctre::phoenix::motorcontrol::can::WPI_BaseMotorController
 WPI_BaseMotorController (int deviceNumber, const char *model)
 
 WPI_BaseMotorController (WPI_BaseMotorController const &)=delete
 
WPI_BaseMotorControlleroperator= (WPI_BaseMotorController const &)=delete
 
virtual void PIDWrite (double output)
 
virtual double Get () const
 
virtual bool GetInverted () const
 
virtual void Disable ()
 
virtual void StopMotor ()
 
void GetDescription (wpi::raw_ostream &desc) const
 
void Feed ()
 
void SetExpiration (double expirationTime)
 
double GetExpiration () const
 
bool IsAlive () const
 
void SetSafetyEnabled (bool enabled)
 
bool IsSafetyEnabled () const
 
frc::MotorSafety & GetMotorSafety ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ctre::phoenix::motorcontrol::can::BaseMotorController
static void DestroyAllMotControllers ()
 
- Protected Member Functions inherited from ctre::phoenix::motorcontrol::can::BaseTalon
ctre::phoenix::motorcontrol::SensorCollectionGetTalonSRXSensorCollection ()
 
ctre::phoenix::motorcontrol::TalonFXSensorCollectionGetTalonFXSensorCollection ()
 
ctre::phoenix::motorcontrol::TalonSRXSimCollectionGetTalonSRXSimCollection ()
 
ctre::phoenix::ErrorCode ConfigurePID (const BaseTalonPIDSetConfiguration &pid, int pidIdx, int timeoutMs, bool enableOptimizations)
 
void GetPIDConfigs (BaseTalonPIDSetConfiguration &pid, int pidIdx=0, int timeoutMs=50)
 
ctre::phoenix::ErrorCode BaseTalonConfigAllSettings (const BaseTalonConfiguration &allConfigs, int timeoutMs=50)
 
void BaseTalonGetAllConfigs (BaseTalonConfiguration &allConfigs, int timeoutMs=50)
 
- Protected Member Functions inherited from ctre::phoenix::motorcontrol::can::BaseMotorController
ctre::phoenix::motorcontrol::VictorSPXSimCollectionGetVictorSPXSimCollection ()
 
virtual ctre::phoenix::ErrorCode BaseConfigAllSettings (const BaseMotorControllerConfiguration &allConfigs, int timeoutMs)
 
virtual void BaseGetAllConfigs (BaseMotorControllerConfiguration &allConfigs, int timeoutMs)
 
virtual void BaseGetPIDConfigs (BasePIDSetConfiguration &pid, int pidIdx, int timeoutMs)
 
- Protected Member Functions inherited from ctre::phoenix::motorcontrol::can::WPI_BaseMotorController
virtual void InitSendable (frc::SendableBuilder &builder)
 

Detailed Description

CTRE Talon SRX Motor Controller when used on CAN Bus.

Constructor & Destructor Documentation

◆ WPI_TalonSRX()

ctre::phoenix::motorcontrol::can::WPI_TalonSRX::WPI_TalonSRX ( int  deviceNumber)

Constructor for a WPI_TalonSRX

Parameters
deviceNumberDevice ID of TalonSRX

Member Function Documentation

◆ ConfigSelectedFeedbackSensor() [1/2]

virtual ctre::phoenix::ErrorCode ctre::phoenix::motorcontrol::can::WPI_TalonSRX::ConfigSelectedFeedbackSensor ( FeedbackDevice  feedbackDevice,
int  pidIdx = 0,
int  timeoutMs = 0 
)
virtual

Select the feedback device for the motor controller.

Parameters
feedbackDeviceFeedback Device to select.
pidIdx0 for Primary closed-loop. 1 for auxiliary closed-loop.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

Reimplemented from ctre::phoenix::motorcontrol::can::TalonSRX.

◆ ConfigSelectedFeedbackSensor() [2/2]

virtual ctre::phoenix::ErrorCode ctre::phoenix::motorcontrol::can::WPI_TalonSRX::ConfigSelectedFeedbackSensor ( RemoteFeedbackDevice  feedbackDevice,
int  pidIdx = 0,
int  timeoutMs = 0 
)
virtual

Select the remote feedback device for the motor controller. Most CTRE CAN motor controllers will support remote sensors over CAN.

Parameters
feedbackDeviceRemote Feedback Device to select.
pidIdx0 for Primary closed-loop. 1 for auxiliary closed-loop.
timeoutMsTimeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
Returns
Error Code generated by function. 0 indicates no error.

Reimplemented from ctre::phoenix::motorcontrol::can::TalonSRX.

◆ Set() [1/3]

virtual void ctre::phoenix::motorcontrol::can::WPI_TalonSRX::Set ( double  speed)
virtual

Common interface for setting the speed of a simple speed controller.

Parameters
speedThe speed to set. Value should be between -1.0 and 1.0. Value is also saved for Get().

Reimplemented from ctre::phoenix::motorcontrol::can::WPI_BaseMotorController.

◆ Set() [2/3]

virtual void ctre::phoenix::motorcontrol::can::WPI_TalonSRX::Set ( ControlMode  mode,
double  value 
)
virtual

Sets the appropriate output on the talon, depending on the mode.

Parameters
modeThe output mode to apply. In PercentOutput, the output is between -1.0 and 1.0, with 0.0 as stopped. In Current mode, output value is in amperes. In Velocity mode, output value is in position change / 100ms. In Position mode, output value is in encoder ticks or an analog value, depending on the sensor. In Follower mode, the output value is the integer device ID of the talon to duplicate.
valueThe setpoint value, as described above.

Standard Driving Example: _talonLeft.set(ControlMode.PercentOutput, leftJoy); _talonRght.set(ControlMode.PercentOutput, rghtJoy);

Reimplemented from ctre::phoenix::motorcontrol::can::TalonSRX.

◆ Set() [3/3]

virtual void ctre::phoenix::motorcontrol::can::WPI_TalonSRX::Set ( ControlMode  mode,
double  demand0,
DemandType  demand1Type,
double  demand1 
)
virtual
Parameters
modeSets the appropriate output on the talon, depending on the mode.
demand0The output value to apply. such as advanced feed forward and/or auxiliary close-looping in firmware. In PercentOutput, the output is between -1.0 and 1.0, with 0.0 as stopped. In Current mode, output value is in amperes. In Velocity mode, output value is in position change / 100ms. In Position mode, output value is in encoder ticks or an analog value, depending on the sensor. See In Follower mode, the output value is the integer device ID of the talon to duplicate.
demand1TypeThe demand type for demand1. Neutral: Ignore demand1 and apply no change to the demand0 output. AuxPID: Use demand1 to set the target for the auxiliary PID 1. Auxiliary PID is always executed as standard Position PID control. ArbitraryFeedForward: Use demand1 as an arbitrary additive value to the demand0 output. In PercentOutput the demand0 output is the motor output, and in closed-loop modes the demand0 output is the output of PID0.
demand1Supplmental output value. AuxPID: Target position in Sensor Units ArbitraryFeedForward: Percent Output between -1.0 and 1.0

Arcade Drive Example: _talonLeft.set(ControlMode.PercentOutput, joyForward, DemandType.ArbitraryFeedForward, +joyTurn); _talonRght.set(ControlMode.PercentOutput, joyForward, DemandType.ArbitraryFeedForward, -joyTurn);

Drive Straight Example: Note: Selected Sensor Configuration is necessary for both PID0 and PID1. _talonLeft.follow(_talonRght, FollwerType.AuxOutput1); _talonRght.set(ControlMode.PercentOutput, joyForward, DemandType.AuxPID, desiredRobotHeading);

Drive Straight to a Distance Example: Note: Other configurations (sensor selection, PID gains, etc.) need to be set. _talonLeft.follow(_talonRght, FollwerType.AuxOutput1); _talonRght.set(ControlMode.MotionMagic, targetDistance, DemandType.AuxPID, desiredRobotHeading);

Reimplemented from ctre::phoenix::motorcontrol::can::TalonSRX.

◆ SetInverted() [1/2]

virtual void ctre::phoenix::motorcontrol::can::WPI_TalonSRX::SetInverted ( InvertType  invertType)
virtual

Common interface for inverting direction of a speed controller.

Parameters
invertTypeThe invert strategy to use. Follower controllers that mirror/oppose the master controller should use this method.

Reimplemented from ctre::phoenix::motorcontrol::can::WPI_BaseMotorController.

◆ SetInverted() [2/2]

virtual void ctre::phoenix::motorcontrol::can::WPI_TalonSRX::SetInverted ( bool  isInverted)
virtual

Common interface for inverting direction of a speed controller.

Parameters
isInvertedThe state of inversion, true is inverted.

Reimplemented from ctre::phoenix::motorcontrol::can::WPI_BaseMotorController.

◆ SetVoltage()

virtual void ctre::phoenix::motorcontrol::can::WPI_TalonSRX::SetVoltage ( units::volt_t  output)
virtual

Sets the voltage output of the SpeedController. Compensates for the current bus voltage to ensure that the desired voltage is output even if the battery voltage is below 12V - highly useful when the voltage outputs are "meaningful" (e.g. they come from a feedforward calculation).

NOTE: This function must be called regularly in order for voltage compensation to work properly - unlike the ordinary set function, it is not "set it and forget it."

Parameters
outputThe voltage to output.

Reimplemented from ctre::phoenix::motorcontrol::can::WPI_BaseMotorController.


The documentation for this class was generated from the following file: