Package frc.team670.pi
Enum ControlMode
java.lang.Object
java.lang.Enum<ControlMode>
frc.team670.pi.ControlMode
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ControlMode>
,java.lang.constant.Constable
public enum ControlMode extends java.lang.Enum<ControlMode>
Possible control modes for a motor.
- Author:
- ctychen
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description Current
Input current closed loopDisabled
Disable Motor ControllerFollower
Follow other motor controllerMotionProfile
Motion ProfilePercentOutput
Percent output [-1.0, +1.0]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 static ControlMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ControlMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PercentOutput
Percent output [-1.0, +1.0] -
Position
Position closed loop -
Velocity
Velocity closed loop -
Current
Input current closed loop -
Follower
Follow other motor controller -
MotionProfile
Motion Profile -
Disabled
Disable Motor Controller
-
-
Field Details
-
value
public final int valueValue 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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-