Package com.playingwithfusion
Enum Class CANVenom.MotionProfileState
- All Implemented Interfaces:
Serializable
,Comparable<CANVenom.MotionProfileState>
,Constable
- Enclosing class:
- CANVenom
State of motion profile execution state machine
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe motion profile was successfully executed.The motion profile buffer was cleared while the profile was being executed.Attempted to begin executing a motion profile but there was no valid start point.The motor ran out of points while executing a motion profile.Initial state after Venom powerupMotion profile is currently executing, but has not reached the final point yet. -
Method Summary
Modifier and TypeMethodDescriptionstatic CANVenom.MotionProfileState
Returns the enum constant of this class with the specified name.static CANVenom.MotionProfileState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Init
Initial state after Venom powerup -
Running
Motion profile is currently executing, but has not reached the final point yet. No errors are active -
ErrBufferCleared
The motion profile buffer was cleared while the profile was being executed. The motor cannot continue and will coast until the motor is placed in another control mode (to reset the error condition) -
ErrBufferUnderflow
The motor ran out of points while executing a motion profile. Either new points were not sent to the motor fast enough or the profile wasn't terminated using theCANVenom.completeMotionProfilePath(double, double)
function. The motor cannot continue and will coast until the motor is placed in another control mode (to reset the error condition) -
ErrBufferInvalid
Attempted to begin executing a motion profile but there was no valid start point. This can happen if theCANVenom.clearMotionProfilePoints()
function is not called before loading a motion profile, or if too many points are loaded and the motor cannot buffer the entire path.Venom can buffer about 300 points. The exact buffer length can be be determined by calling
CANVenom.getNumAvaliableMotionProfilePoints()
immediatly after power up. If the motion profile contains more points than can be stored in the buffer, the profile must be reloaded each time before begining to follow the profile.For large paths with many points, first load a subset of the points, begin executing the path, then continue to load new points as the motor executes the path. Call the
CANVenom.getNumAvaliableMotionProfilePoints()
function periodically to ensure the Venom buffer has sufficient space before loading additional points. -
Done
The motion profile was successfully executed. The motor will now hold the current position (at zero speed) until the motor is placed in another control mode.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-