Enum Class Canandcolor.DataSource

All Implemented Interfaces:
Serializable, Comparable<Canandcolor.DataSource>, Constable
Enclosing class:

public static enum Canandcolor.DataSource extends Enum<Canandcolor.DataSource>
Data sources that digout slots can use to perform comparisons or output data directly as a duty cycle.

All values are typically considered to be scaled between 0.0 and 1.0. For proximity, red, green, blue, white, and HSV, the values that digout slots consider (and what the Rio would read if it read the PWM outputs), they are generally equivalent to the values read through functions like Canandcolor.getProximity() or Canandcolor.getColor().

  • Enum Constant Details

  • Method Details

    • values

      public static Canandcolor.DataSource[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Canandcolor.DataSource 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getIndex

      public byte getIndex()
      Returns the associated index number for the enum (used in serialization)
      the associated index number for the enum.
    • fromIndex

      public static Canandcolor.DataSource fromIndex(int v)
      Fetches the enum associated with the index value.
      v - int containing index value -- if index > max value, the modulo is used
      corresponding enum