Enum CANVenom.MotionProfileState

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Done
      The motion profile was successfully executed.
      ErrBufferCleared
      The motion profile buffer was cleared while the profile was being executed.
      ErrBufferInvalid
      Attempted to begin executing a motion profile but there was no valid start point.
      ErrBufferUnderflow
      The motor ran out of points while executing a motion profile.
      Init
      Initial state after Venom powerup
      Running
      Motion profile is currently executing, but has not reached the final point yet.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CANVenom.MotionProfileState valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CANVenom.MotionProfileState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static CANVenom.MotionProfileState[] 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.MotionProfileState c : CANVenom.MotionProfileState.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.MotionProfileState 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 name
        java.lang.NullPointerException - if the argument is null