Enum Class POVDirection

java.lang.Object
java.lang.Enum<POVDirection>
org.wpilib.driverstation.POVDirection
All Implemented Interfaces:
Serializable, Comparable<POVDirection>, Constable

public enum POVDirection extends Enum<POVDirection>
A controller POV direction.
  • Enum Constant Details

  • Field Details

    • value

      public final byte value
      The corresponding HAL value.
  • Method Details

    • values

      public static POVDirection[] 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 POVDirection 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
    • of

      public static POVDirection of(byte value)
      Converts a byte value into a POVDirection enum value.
      Parameters:
      value - The byte value to convert.
      Returns:
      The corresponding POVDirection enum value.
      Throws:
      IllegalArgumentException - If value does not correspond to a POVDirection.
    • getAngle

      Gets the angle of a POVDirection.
      Returns:
      The angle clockwise from straight up, or Optional.empty() if this POVDirection is CENTER.