Enum Class LightColor

java.lang.Object
java.lang.Enum<LightColor>
com.crossbotics.ftchelper.robot.LightColor
All Implemented Interfaces:
Serializable, Comparable<LightColor>, Constable

public enum LightColor extends Enum<LightColor>
The colors a Lights module can show. Each light turns the name into its own signal: a servo position for the goBILDA RGB Indicator Light, a pattern for the REV Blinkin.

 robot.lights.show(LightColor.GREEN).when(robot.intake::isRunning);
 

Why not just "Color"? Android already has a class called Color (color sensors use it), and two classes with one name in one file do not compile. Docs: docs/modules/robot.md (section "Lights")

  • Enum Constant Details

    • RED

      public static final LightColor RED
      Red. goBILDA 0.280 (the table says 0.277 = 1099 us, a hair under the 1100 us "off" line), Blinkin RED.
    • ORANGE

      public static final LightColor ORANGE
      Orange. goBILDA 0.333, Blinkin ORANGE.
    • YELLOW

      public static final LightColor YELLOW
      Yellow. goBILDA 0.388, Blinkin YELLOW.
    • GREEN

      public static final LightColor GREEN
      Green. goBILDA 0.500, Blinkin GREEN.
    • BLUE

      public static final LightColor BLUE
      Blue. goBILDA 0.611, Blinkin BLUE.
    • PURPLE

      public static final LightColor PURPLE
      Purple. goBILDA 0.700 (between indigo 0.666 and violet 0.722: violet is 1 us from turning white), Blinkin VIOLET.
    • WHITE

      public static final LightColor WHITE
      White. goBILDA 1.0, Blinkin WHITE.
    • OFF

      public static final LightColor OFF
      Dark. goBILDA 0.0, Blinkin BLACK (all LEDs off).
  • Method Details

    • values

      public static LightColor[] 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 LightColor 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
    • gobildaPosition

      public double gobildaPosition()
      The servo position (0 to 1) that shows this color on a goBILDA RGB Indicator Light (3118-0808-0002) with the hub's normal servo signal.
    • blinkinPattern

      public com.qualcomm.hardware.rev.RevBlinkinLedDriver.BlinkinPattern blinkinPattern()
      The REV Blinkin LED Driver (REV-11-1105) pattern that shows this color: a solid color.
    • webColor

      public String webColor()
      About how it looks, as a web color ("#20c040"): for the simulator page.