Enum Class CANVenom.MotionProfileState

java.lang.Object
java.lang.Enum<CANVenom.MotionProfileState>
com.playingwithfusion.CANVenom.MotionProfileState
All Implemented Interfaces:
Serializable, Comparable<CANVenom.MotionProfileState>, Constable
Enclosing class:
CANVenom

public static enum CANVenom.MotionProfileState extends Enum<CANVenom.MotionProfileState>
State of motion profile execution state machine
  • Enum Constant Details

    • Init

      public static final CANVenom.MotionProfileState Init
      Initial state after Venom powerup
    • Running

      public static final CANVenom.MotionProfileState Running
      Motion profile is currently executing, but has not reached the final point yet. No errors are active
    • ErrBufferCleared

      public static final CANVenom.MotionProfileState 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

      public static final CANVenom.MotionProfileState 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 the CANVenom.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

      public static final CANVenom.MotionProfileState ErrBufferInvalid
      Attempted to begin executing a motion profile but there was no valid start point. This can happen if the CANVenom.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

      public static final CANVenom.MotionProfileState 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

      public static CANVenom.MotionProfileState[] 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

      public static CANVenom.MotionProfileState valueOf(String name)
      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 name
      NullPointerException - if the argument is null