Package com.ctre.phoenix.motorcontrol
Enum TalonSRXControlMode
- All Implemented Interfaces:
Serializable
,Comparable<TalonSRXControlMode>
,java.lang.constant.Constable
public enum TalonSRXControlMode extends Enum<TalonSRXControlMode>
Choose the control mode for a TalonSRX.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description Current
Input current closed loopDisabled
Disable Motor ControllerFollower
Follow other motor controllerMotionMagic
Motion MagicMotionProfile
Motion ProfileMotionProfileArc
Motion Profile with auxiliary outputPercentOutput
Percent output [-1,1]Position
Position closed loopVelocity
Velocity closed loop -
Field Summary
Fields Modifier and Type Field Description int
value
Value of control mode -
Method Summary
Modifier and Type Method Description ControlMode
toControlMode()
Helper method to convert to generic ControlMode enum.static TalonSRXControlMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static TalonSRXControlMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PercentOutput
Percent output [-1,1] -
Position
Position closed loop -
Velocity
Velocity closed loop -
Current
Input current closed loop -
Follower
Follow other motor controller -
MotionProfile
Motion Profile -
MotionMagic
Motion Magic -
MotionProfileArc
Motion Profile with auxiliary output -
Disabled
Disable Motor Controller
-
-
Field Details
-
value
Value of control mode
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toControlMode
Helper method to convert to generic ControlMode enum.- Returns:
- value cast as ControlMode
-