Package com.playingwithfusion
Enum CANVenom.ControlMode
- java.lang.Object
-
- java.lang.Enum<CANVenom.ControlMode>
-
- com.playingwithfusion.CANVenom.ControlMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CANVenom.ControlMode>
- Enclosing class:
- CANVenom
public static enum CANVenom.ControlMode extends java.lang.Enum<CANVenom.ControlMode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CurrentControl
Closed-loop current (torque) controlDisabled
Motor is disabled and coastingFollowTheLeader
Follow the duty cycle commanded to another Venom motor.MotionProfile
Execute a motion control path.PositionControl
Closed-loop position (servo) control.Proportional
Proportional (duty-cycle) controlSpeedControl
Closed-loop speed control.VoltageControl
Open-loop voltage control mode, also refered to voltage compensated proportional mode
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CANVenom.ControlMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CANVenom.ControlMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Disabled
public static final CANVenom.ControlMode Disabled
Motor is disabled and coasting
-
Proportional
public static final CANVenom.ControlMode Proportional
Proportional (duty-cycle) control
-
CurrentControl
public static final CANVenom.ControlMode CurrentControl
Closed-loop current (torque) control
-
SpeedControl
public static final CANVenom.ControlMode SpeedControl
Closed-loop speed control.
-
PositionControl
public static final CANVenom.ControlMode PositionControl
Closed-loop position (servo) control.
-
MotionProfile
public static final CANVenom.ControlMode MotionProfile
Execute a motion control path. Motion profiles are generally loaded in Disabled mode. The transition to the MotionProfile state causes Venom to begin following the path.
-
FollowTheLeader
public static final CANVenom.ControlMode FollowTheLeader
Follow the duty cycle commanded to another Venom motor. Generally used when more that one Venom is geared together in a drivetrain application. In that case one Venom, the leader, executes a motion profile or is placed in another control mode. The other Venom(s) are placed in FolloewTheLeader and command the same duty cycle as the leader so that only the leader is used to calculate closed-loop commands. This avoid implementing PID controllers on multiple motors which may "fight".
-
VoltageControl
public static final CANVenom.ControlMode VoltageControl
Open-loop voltage control mode, also refered to voltage compensated proportional mode
-
-
Method Detail
-
values
public static CANVenom.ControlMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CANVenom.ControlMode c : CANVenom.ControlMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CANVenom.ControlMode valueOf(java.lang.String name)
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
-
-