CTRE_Phoenix  5.19.4
com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX Class Reference

Inherits com.ctre.phoenix.motorcontrol.can.TalonSRX, SpeedController, and Sendable.

Public Member Functions

 WPI_TalonSRX (int deviceNumber)
 
void set (double speed)
 
void pidWrite (double output)
 
double get ()
 
void set (ControlMode mode, double value)
 
void set (ControlMode mode, double demand0, DemandType demand1Type, double demand1)
 
void setVoltage (double outputVolts)
 
void setInverted (boolean isInverted)
 
boolean getInverted ()
 
void disable ()
 
void stopMotor ()
 
void free ()
 
final synchronized String getName ()
 
final synchronized void setName (String name)
 
final void setName (String moduleType, int channel)
 
final void setName (String moduleType, int moduleNumber, int channel)
 
final synchronized String getSubsystem ()
 
final synchronized void setSubsystem (String subsystem)
 
final void addChild (Object child)
 
void initSendable (SendableBuilder builder)
 
String getDescription ()
 
void feed ()
 
void setExpiration (double expirationTime)
 
double getExpiration ()
 
boolean isAlive ()
 
void setSafetyEnabled (boolean enabled)
 
boolean isSafetyEnabled ()
 
- Public Member Functions inherited from com.ctre.phoenix.motorcontrol.can.TalonSRX
 TalonSRX (int deviceNumber)
 
void set (TalonSRXControlMode mode, double value)
 
void set (TalonSRXControlMode mode, double demand0, DemandType demand1Type, double demand1)
 
SensorCollection getSensorCollection ()
 
TalonSRXSimCollection getSimCollection ()
 
ErrorCode configSelectedFeedbackSensor (TalonSRXFeedbackDevice feedbackDevice, int pidIdx, int timeoutMs)
 
ErrorCode configSupplyCurrentLimit (SupplyCurrentLimitConfiguration currLimitConfigs, int timeoutMs)
 
ErrorCode configSupplyCurrentLimit (SupplyCurrentLimitConfiguration currLimitConfigs)
 
ErrorCode configPeakCurrentLimit (int amps, int timeoutMs)
 
ErrorCode configPeakCurrentLimit (int amps)
 
ErrorCode configPeakCurrentDuration (int milliseconds, int timeoutMs)
 
ErrorCode configPeakCurrentDuration (int milliseconds)
 
ErrorCode configContinuousCurrentLimit (int amps, int timeoutMs)
 
ErrorCode configContinuousCurrentLimit (int amps)
 
void enableCurrentLimit (boolean enable)
 
void getPIDConfigs (TalonSRXPIDSetConfiguration pid, int pidIdx, int timeoutMs)
 
void getPIDConfigs (TalonSRXPIDSetConfiguration pid)
 
ErrorCode configAllSettings (TalonSRXConfiguration allConfigs, int timeoutMs)
 
ErrorCode configAllSettings (TalonSRXConfiguration allConfigs)
 
void getAllConfigs (TalonSRXConfiguration allConfigs, int timeoutMs)
 
void getAllConfigs (TalonSRXConfiguration allConfigs)
 
- Public Member Functions inherited from com.ctre.phoenix.motorcontrol.can.BaseTalon
 BaseTalon (int deviceNumber, String model)
 
ErrorCode setStatusFramePeriod (StatusFrameEnhanced frame, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (StatusFrameEnhanced frame, int periodMs)
 
int getStatusFramePeriod (StatusFrameEnhanced frame, int timeoutMs)
 
int getStatusFramePeriod (StatusFrameEnhanced frame)
 
double getOutputCurrent ()
 
double getStatorCurrent ()
 
double getSupplyCurrent ()
 
ErrorCode configVelocityMeasurementPeriod (VelocityMeasPeriod period, int timeoutMs)
 
ErrorCode configVelocityMeasurementPeriod (VelocityMeasPeriod period)
 
ErrorCode configVelocityMeasurementWindow (int windowSize, int timeoutMs)
 
ErrorCode configVelocityMeasurementWindow (int windowSize)
 
ErrorCode configForwardLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int timeoutMs)
 
ErrorCode configForwardLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose)
 
ErrorCode configReverseLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int timeoutMs)
 
ErrorCode configReverseLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose)
 
ErrorCode configSupplyCurrentLimit (SupplyCurrentLimitConfiguration currLimitCfg, int timeoutMs)
 
int isFwdLimitSwitchClosed ()
 
int isRevLimitSwitchClosed ()
 
- Public Member Functions inherited from com.ctre.phoenix.motorcontrol.can.BaseMotorController
 BaseMotorController (int arbId, String model)
 
ErrorCode DestroyObject ()
 
long getHandle ()
 
int getDeviceID ()
 
void set (ControlMode mode, double outputValue)
 
void set (ControlMode mode, double demand0, DemandType demand1Type, double demand1)
 
void neutralOutput ()
 
void setNeutralMode (NeutralMode neutralMode)
 
void setSensorPhase (boolean PhaseSensor)
 
void setInverted (boolean invert)
 
void setInverted (InvertType invertType)
 
boolean getInverted ()
 
ErrorCode configFactoryDefault (int timeoutMs)
 
ErrorCode configFactoryDefault ()
 
ErrorCode configOpenloopRamp (double secondsFromNeutralToFull, int timeoutMs)
 
ErrorCode configOpenloopRamp (double secondsFromNeutralToFull)
 
ErrorCode configClosedloopRamp (double secondsFromNeutralToFull, int timeoutMs)
 
ErrorCode configClosedloopRamp (double secondsFromNeutralToFull)
 
ErrorCode configPeakOutputForward (double percentOut, int timeoutMs)
 
ErrorCode configPeakOutputForward (double percentOut)
 
ErrorCode configPeakOutputReverse (double percentOut, int timeoutMs)
 
ErrorCode configPeakOutputReverse (double percentOut)
 
ErrorCode configNominalOutputForward (double percentOut, int timeoutMs)
 
ErrorCode configNominalOutputForward (double percentOut)
 
ErrorCode configNominalOutputReverse (double percentOut, int timeoutMs)
 
ErrorCode configNominalOutputReverse (double percentOut)
 
ErrorCode configNeutralDeadband (double percentDeadband, int timeoutMs)
 
ErrorCode configNeutralDeadband (double percentDeadband)
 
ErrorCode configVoltageCompSaturation (double voltage, int timeoutMs)
 
ErrorCode configVoltageCompSaturation (double voltage)
 
ErrorCode configVoltageMeasurementFilter (int filterWindowSamples, int timeoutMs)
 
ErrorCode configVoltageMeasurementFilter (int filterWindowSamples)
 
void enableVoltageCompensation (boolean enable)
 
boolean isVoltageCompensationEnabled ()
 
double getBusVoltage ()
 
double getMotorOutputPercent ()
 
double getMotorOutputVoltage ()
 
double getTemperature ()
 
ErrorCode configSelectedFeedbackSensor (RemoteFeedbackDevice feedbackDevice, int pidIdx, int timeoutMs)
 
ErrorCode configSelectedFeedbackSensor (RemoteFeedbackDevice feedbackDevice)
 
ErrorCode configSelectedFeedbackSensor (FeedbackDevice feedbackDevice, int pidIdx, int timeoutMs)
 
ErrorCode configSelectedFeedbackSensor (FeedbackDevice feedbackDevice)
 
ErrorCode configSelectedFeedbackCoefficient (double coefficient, int pidIdx, int timeoutMs)
 
ErrorCode configSelectedFeedbackCoefficient (double coefficient)
 
ErrorCode configRemoteFeedbackFilter (int deviceID, RemoteSensorSource remoteSensorSource, int remoteOrdinal, int timeoutMs)
 
ErrorCode configRemoteFeedbackFilter (int deviceID, RemoteSensorSource remoteSensorSource, int remoteOrdinal)
 
ErrorCode configRemoteFeedbackFilter (CANCoder canCoderRef, int remoteOrdinal, int timeoutMs)
 
ErrorCode configRemoteFeedbackFilter (CANCoder canCoderRef, int remoteOrdinal)
 
ErrorCode configSensorTerm (SensorTerm sensorTerm, FeedbackDevice feedbackDevice, int timeoutMs)
 
ErrorCode configSensorTerm (SensorTerm sensorTerm, FeedbackDevice feedbackDevice)
 
ErrorCode configSensorTerm (SensorTerm sensorTerm, RemoteFeedbackDevice feedbackDevice, int timeoutMs)
 
ErrorCode configSensorTerm (SensorTerm sensorTerm, RemoteFeedbackDevice feedbackDevice)
 
double getSelectedSensorPosition (int pidIdx)
 
double getSelectedSensorPosition ()
 
double getSelectedSensorVelocity (int pidIdx)
 
double getSelectedSensorVelocity ()
 
ErrorCode setSelectedSensorPosition (double sensorPos, int pidIdx, int timeoutMs)
 
ErrorCode setSelectedSensorPosition (double sensorPos)
 
ErrorCode setControlFramePeriod (ControlFrame frame, int periodMs)
 
ErrorCode setControlFramePeriod (int frame, int periodMs)
 
ErrorCode setStatusFramePeriod (int frameValue, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (int frameValue, int periodMs)
 
ErrorCode setStatusFramePeriod (StatusFrame frame, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (StatusFrame frame, int periodMs)
 
int getStatusFramePeriod (int frame, int timeoutMs)
 
int getStatusFramePeriod (int frame)
 
int getStatusFramePeriod (StatusFrame frame, int timeoutMs)
 
int getStatusFramePeriod (StatusFrame frame)
 
int getStatusFramePeriod (StatusFrameEnhanced frame, int timeoutMs)
 
int getStatusFramePeriod (StatusFrameEnhanced frame)
 
ErrorCode configVelocityMeasurementPeriod (VelocityMeasPeriod period, int timeoutMs)
 
ErrorCode configVelocityMeasurementPeriod (VelocityMeasPeriod period)
 
ErrorCode configVelocityMeasurementWindow (int windowSize, int timeoutMs)
 
ErrorCode configVelocityMeasurementWindow (int windowSize)
 
ErrorCode configForwardLimitSwitchSource (RemoteLimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int deviceID, int timeoutMs)
 
ErrorCode configForwardLimitSwitchSource (RemoteLimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int deviceID)
 
ErrorCode configReverseLimitSwitchSource (RemoteLimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int deviceID, int timeoutMs)
 
ErrorCode configReverseLimitSwitchSource (RemoteLimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int deviceID)
 
ErrorCode configForwardLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int timeoutMs)
 
ErrorCode configForwardLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose)
 
void overrideLimitSwitchesEnable (boolean enable)
 
ErrorCode configForwardSoftLimitThreshold (double forwardSensorLimit, int timeoutMs)
 
ErrorCode configForwardSoftLimitThreshold (double forwardSensorLimit)
 
ErrorCode configReverseSoftLimitThreshold (double reverseSensorLimit, int timeoutMs)
 
ErrorCode configReverseSoftLimitThreshold (double reverseSensorLimit)
 
ErrorCode configForwardSoftLimitEnable (boolean enable, int timeoutMs)
 
ErrorCode configForwardSoftLimitEnable (boolean enable)
 
ErrorCode configReverseSoftLimitEnable (boolean enable, int timeoutMs)
 
ErrorCode configReverseSoftLimitEnable (boolean enable)
 
void overrideSoftLimitsEnable (boolean enable)
 
ErrorCode config_kP (int slotIdx, double value, int timeoutMs)
 
ErrorCode config_kP (int slotIdx, double value)
 
ErrorCode config_kI (int slotIdx, double value, int timeoutMs)
 
ErrorCode config_kI (int slotIdx, double value)
 
ErrorCode config_kD (int slotIdx, double value, int timeoutMs)
 
ErrorCode config_kD (int slotIdx, double value)
 
ErrorCode config_kF (int slotIdx, double value, int timeoutMs)
 
ErrorCode config_kF (int slotIdx, double value)
 
ErrorCode config_IntegralZone (int slotIdx, double izone, int timeoutMs)
 
ErrorCode config_IntegralZone (int slotIdx, double izone)
 
ErrorCode configAllowableClosedloopError (int slotIdx, double allowableClosedLoopError, int timeoutMs)
 
ErrorCode configAllowableClosedloopError (int slotIdx, double allowableClosedLoopError)
 
ErrorCode configMaxIntegralAccumulator (int slotIdx, double iaccum, int timeoutMs)
 
ErrorCode configMaxIntegralAccumulator (int slotIdx, double iaccum)
 
ErrorCode configClosedLoopPeakOutput (int slotIdx, double percentOut, int timeoutMs)
 
ErrorCode configClosedLoopPeakOutput (int slotIdx, double percentOut)
 
ErrorCode configClosedLoopPeriod (int slotIdx, int loopTimeMs, int timeoutMs)
 
ErrorCode configClosedLoopPeriod (int slotIdx, int loopTimeMs)
 
ErrorCode configAuxPIDPolarity (boolean invert, int timeoutMs)
 
ErrorCode configAuxPIDPolarity (boolean invert)
 
ErrorCode setIntegralAccumulator (double iaccum, int pidIdx, int timeoutMs)
 
ErrorCode setIntegralAccumulator (double iaccum)
 
double getClosedLoopError (int pidIdx)
 
double getClosedLoopError ()
 
double getIntegralAccumulator (int pidIdx)
 
double getIntegralAccumulator ()
 
double getErrorDerivative (int pidIdx)
 
double getErrorDerivative ()
 
void selectProfileSlot (int slotIdx, int pidIdx)
 
double getClosedLoopTarget (int pidIdx)
 
double getClosedLoopTarget ()
 
double getActiveTrajectoryPosition ()
 
double getActiveTrajectoryPosition (int pidIdx)
 
double getActiveTrajectoryVelocity ()
 
double getActiveTrajectoryVelocity (int pidIdx)
 
double getActiveTrajectoryArbFeedFwd ()
 
double getActiveTrajectoryArbFeedFwd (int pidIdx)
 
ErrorCode configMotionCruiseVelocity (double sensorUnitsPer100ms, int timeoutMs)
 
ErrorCode configMotionCruiseVelocity (double sensorUnitsPer100ms)
 
ErrorCode configMotionAcceleration (double sensorUnitsPer100msPerSec, int timeoutMs)
 
ErrorCode configMotionAcceleration (double sensorUnitsPer100msPerSec)
 
ErrorCode configMotionSCurveStrength (int curveStrength, int timeoutMs)
 
ErrorCode configMotionSCurveStrength (int curveStrength)
 
ErrorCode clearMotionProfileTrajectories ()
 
int getMotionProfileTopLevelBufferCount ()
 
ErrorCode pushMotionProfileTrajectory (TrajectoryPoint trajPt)
 
ErrorCode startMotionProfile (BufferedTrajectoryPointStream stream, int minBufferedPts, ControlMode motionProfControlMode)
 
boolean isMotionProfileFinished ()
 
boolean isMotionProfileTopLevelBufferFull ()
 
void processMotionProfileBuffer ()
 
ErrorCode getMotionProfileStatus (MotionProfileStatus statusToFill)
 
ErrorCode clearMotionProfileHasUnderrun (int timeoutMs)
 
ErrorCode clearMotionProfileHasUnderrun ()
 
ErrorCode changeMotionControlFramePeriod (int periodMs)
 
ErrorCode configMotionProfileTrajectoryPeriod (int baseTrajDurationMs, int timeoutMs)
 
ErrorCode configMotionProfileTrajectoryPeriod (int baseTrajDurationMs)
 
ErrorCode configMotionProfileTrajectoryInterpolationEnable (boolean enable, int timeoutMs)
 
ErrorCode configMotionProfileTrajectoryInterpolationEnable (boolean enable)
 
ErrorCode configFeedbackNotContinuous (boolean feedbackNotContinuous, int timeoutMs)
 
ErrorCode configRemoteSensorClosedLoopDisableNeutralOnLOS (boolean remoteSensorClosedLoopDisableNeutralOnLOS, int timeoutMs)
 
ErrorCode configClearPositionOnLimitF (boolean clearPositionOnLimitF, int timeoutMs)
 
ErrorCode configClearPositionOnLimitR (boolean clearPositionOnLimitR, int timeoutMs)
 
ErrorCode configClearPositionOnQuadIdx (boolean clearPositionOnQuadIdx, int timeoutMs)
 
ErrorCode configLimitSwitchDisableNeutralOnLOS (boolean limitSwitchDisableNeutralOnLOS, int timeoutMs)
 
ErrorCode configSoftLimitDisableNeutralOnLOS (boolean softLimitDisableNeutralOnLOS, int timeoutMs)
 
ErrorCode configPulseWidthPeriod_EdgesPerRot (int pulseWidthPeriod_EdgesPerRot, int timeoutMs)
 
ErrorCode configPulseWidthPeriod_FilterWindowSz (int pulseWidthPeriod_FilterWindowSz, int timeoutMs)
 
ErrorCode getLastError ()
 
ErrorCode getFaults (Faults toFill)
 
ErrorCode getStickyFaults (StickyFaults toFill)
 
ErrorCode clearStickyFaults (int timeoutMs)
 
ErrorCode clearStickyFaults ()
 
int getFirmwareVersion ()
 
boolean hasResetOccurred ()
 
ErrorCode configSetCustomParam (int newValue, int paramIndex, int timeoutMs)
 
ErrorCode configSetCustomParam (int newValue, int paramIndex)
 
int configGetCustomParam (int paramIndex, int timeoutMs)
 
int configGetCustomParam (int paramIndex)
 
ErrorCode configSetParameter (ParamEnum param, double value, int subValue, int ordinal, int timeoutMs)
 
ErrorCode configSetParameter (ParamEnum param, double value, int subValue, int ordinal)
 
ErrorCode configSetParameter (int param, double value, int subValue, int ordinal, int timeoutMs)
 
ErrorCode configSetParameter (int param, double value, int subValue, int ordinal)
 
double configGetParameter (ParamEnum param, int ordinal, int timeoutMs)
 
double configGetParameter (ParamEnum param, int ordinal)
 
double configGetParameter (int param, int ordinal, int timeoutMs)
 
double configGetParameter (int param, int ordinal)
 
int getBaseID ()
 
ControlMode getControlMode ()
 
void follow (IMotorController masterToFollow, FollowerType followerType)
 
void follow (IMotorController masterToFollow)
 
void valueUpdated ()
 
ErrorCode configureSlot (SlotConfiguration slot)
 
ErrorCode configureSlot (SlotConfiguration slot, int slotIdx, int timeoutMs)
 
void getSlotConfigs (SlotConfiguration slot, int slotIdx, int timeoutMs)
 
void getSlotConfigs (SlotConfiguration slot)
 
ErrorCode configureFilter (FilterConfiguration filter, int ordinal, int timeoutMs, boolean enableOptimizations)
 
ErrorCode configureFilter (FilterConfiguration filter, int ordinal, int timeoutMs)
 
ErrorCode configureFilter (FilterConfiguration filter)
 
void getFilterConfigs (FilterConfiguration filter, int ordinal, int timeoutMs)
 
void getFilterConfigs (FilterConfiguration filter)
 
- Public Member Functions inherited from com.ctre.phoenix.motorcontrol.IMotorControllerEnhanced
ErrorCode configSelectedFeedbackSensor (FeedbackDevice feedbackDevice, int pidIdx, int timeoutMs)
 

Static Public Attributes

static final double kDefaultSafetyExpiration = 0.1
 

Additional Inherited Members

- Protected Member Functions inherited from com.ctre.phoenix.motorcontrol.can.TalonSRX
ErrorCode configurePID (TalonSRXPIDSetConfiguration pid, int pidIdx, int timeoutMs)
 
ErrorCode configurePID (TalonSRXPIDSetConfiguration pid)
 
- Protected Member Functions inherited from com.ctre.phoenix.motorcontrol.can.BaseTalon
SensorCollection getTalonSRXSensorCollection ()
 
TalonFXSensorCollection getTalonFXSensorCollection ()
 
TalonSRXSimCollection getTalonSRXSimCollection ()
 
ErrorCode configurePID (BaseTalonPIDSetConfiguration pid, int pidIdx, int timeoutMs, boolean enableOptimizations)
 
ErrorCode configurePID (BaseTalonPIDSetConfiguration pid)
 
void getPIDConfigs (BaseTalonPIDSetConfiguration pid, int pidIdx, int timeoutMs)
 
void getPIDConfigs (BaseTalonPIDSetConfiguration pid)
 
ErrorCode configAllSettings (BaseTalonConfiguration allConfigs, int timeoutMs)
 
ErrorCode configAllSettings (BaseTalonConfiguration allConfigs)
 
void getAllConfigs (BaseTalonConfiguration allConfigs, int timeoutMs)
 
void getAllConfigs (BaseTalonConfiguration allConfigs)
 
- Protected Member Functions inherited from com.ctre.phoenix.motorcontrol.can.BaseMotorController
VictorSPXSimCollection getVictorSPXSimCollection ()
 
double getOutputCurrent ()
 
ErrorCode configForwardLimitSwitchSource (int typeValue, int normalOpenOrCloseValue, int deviceID, int timeoutMs)
 
ErrorCode configReverseLimitSwitchSource (int typeValue, int normalOpenOrCloseValue, int deviceID, int timeoutMs)
 
ErrorCode baseConfigAllSettings (BaseMotorControllerConfiguration allConfigs, int timeoutMs)
 
ErrorCode baseConfigurePID (BasePIDSetConfiguration pid, int pidIdx, int timeoutMs)
 
void baseGetPIDConfigs (BasePIDSetConfiguration pid, int pidIdx, int timeoutMs)
 
void baseGetAllConfigs (BaseMotorControllerConfiguration allConfigs, int timeoutMs)
 
- Protected Attributes inherited from com.ctre.phoenix.motorcontrol.can.BaseMotorController
long m_handle
 

Detailed Description

CTRE Talon SRX Motor Controller when used on CAN Bus.

Constructor & Destructor Documentation

◆ WPI_TalonSRX()

com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.WPI_TalonSRX ( int  deviceNumber)
inline

Constructor for motor controller

Parameters
deviceNumberdevice ID of motor controller

Member Function Documentation

◆ addChild()

final void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.addChild ( Object  child)
inline

Add a child component.

Parameters
childchild component

◆ disable()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.disable ( )
inline

Common interface for disabling a motor.

◆ feed()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.feed ( )
inline

Feed the motor safety object.

Resets the timer on this object that is used to do the timeouts.

◆ free()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.free ( )
inline

Free the resources used by this object.

◆ get()

double com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.get ( )
inline

Common interface for getting the current set speed of a speed controller.

Returns
The current set speed. Value is between -1.0 and 1.0.

◆ getDescription()

String com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.getDescription ( )
inline
Returns
description of controller

◆ getExpiration()

double com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.getExpiration ( )
inline

Retrieve the timeout value for the corresponding motor safety object.

Returns
the timeout value in seconds.

◆ getInverted()

boolean com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.getInverted ( )
inline

Common interface for returning the inversion state of a speed controller.

Returns
The state of inversion, true is inverted.

Implements com.ctre.phoenix.motorcontrol.IMotorController.

◆ getName()

final synchronized String com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.getName ( )
inline
Returns
name of object

◆ getSubsystem()

final synchronized String com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.getSubsystem ( )
inline
Returns
subsystem name of this object

◆ initSendable()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.initSendable ( SendableBuilder  builder)
inline

Initialize sendable

Parameters
builderBase sendable to build on

◆ isAlive()

boolean com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.isAlive ( )
inline

Determine of the motor is still operating or has timed out.

Returns
a true value if the motor is still operating normally and hasn't timed out.

◆ isSafetyEnabled()

boolean com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.isSafetyEnabled ( )
inline

Return the state of the motor safety enabled flag.

Return if the motor safety is currently enabled for this device.

Returns
True if motor safety is enforced for this device

◆ pidWrite()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.pidWrite ( double  output)
inline

Special write for PID, same functionality as calling set

Parameters
outputOutput to send to motor

◆ set() [1/3]

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.set ( double  speed)
inline

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().

◆ set() [2/3]

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.set ( ControlMode  mode,
double  value 
)
inline

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);

Implements com.ctre.phoenix.motorcontrol.IMotorController.

◆ set() [3/3]

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.set ( ControlMode  mode,
double  demand0,
DemandType  demand1Type,
double  demand1 
)
inline
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. 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. Units match the set mode.

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);

Implements com.ctre.phoenix.motorcontrol.IMotorController.

◆ setExpiration()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setExpiration ( double  expirationTime)
inline

Set the expiration time for the corresponding motor safety object.

Parameters
expirationTimeThe timeout value in seconds.

◆ setInverted()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setInverted ( boolean  isInverted)
inline

Common interface for inverting direction of a speed controller.

Parameters
isInvertedThe state of inversion, true is inverted.

Implements com.ctre.phoenix.motorcontrol.IMotorController.

◆ setName() [1/3]

final synchronized void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setName ( String  name)
inline

Sets the name of the object

Parameters
namename of object

◆ setName() [2/3]

final void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setName ( String  moduleType,
int  channel 
)
inline

Sets the name of the sensor with a channel number.

Parameters
moduleTypeA string that defines the module name in the label for the value
channelThe channel number the device is plugged into

◆ setName() [3/3]

final void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setName ( String  moduleType,
int  moduleNumber,
int  channel 
)
inline

Sets the name of the sensor with a module and channel number.

Parameters
moduleTypeA string that defines the module name in the label for the value
moduleNumberThe number of the particular module type
channelThe channel number the device is plugged into (usually PWM)

◆ setSafetyEnabled()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setSafetyEnabled ( boolean  enabled)
inline

Enable/disable motor safety for this device.

Turn on and off the motor safety option for this PWM object.

Parameters
enabledTrue if motor safety is enforced for this object

◆ setSubsystem()

final synchronized void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setSubsystem ( String  subsystem)
inline

Sets the subsystem name of this object

Parameters
subsystem

◆ setVoltage()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.setVoltage ( double  outputVolts)
inline

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
outputVoltsThe voltage to output.

◆ stopMotor()

void com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.stopMotor ( )
inline

Common interface to stop the motor until Set is called again.

Member Data Documentation

◆ kDefaultSafetyExpiration

final double com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.kDefaultSafetyExpiration = 0.1
static

The default motor safety timeout IF calling application enables the feature.


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