Package com.crossbotics.ftchelper.robot
Enum Class LightColor
- All Implemented Interfaces:
Serializable,Comparable<LightColor>,Constable
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")
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptioncom.qualcomm.hardware.rev.RevBlinkinLedDriver.BlinkinPatternThe REV Blinkin LED Driver (REV-11-1105) pattern that shows this color: a solid color.doubleThe 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.static LightColorReturns the enum constant of this class with the specified name.static LightColor[]values()Returns an array containing the constants of this enum class, in the order they are declared.webColor()About how it looks, as a web color ("#20c040"): for the simulator page.
-
Enum Constant Details
-
RED
Red. goBILDA 0.280 (the table says 0.277 = 1099 us, a hair under the 1100 us "off" line), Blinkin RED. -
ORANGE
Orange. goBILDA 0.333, Blinkin ORANGE. -
YELLOW
Yellow. goBILDA 0.388, Blinkin YELLOW. -
GREEN
Green. goBILDA 0.500, Blinkin GREEN. -
BLUE
Blue. goBILDA 0.611, Blinkin BLUE. -
PURPLE
Purple. goBILDA 0.700 (between indigo 0.666 and violet 0.722: violet is 1 us from turning white), Blinkin VIOLET. -
WHITE
White. goBILDA 1.0, Blinkin WHITE. -
OFF
Dark. goBILDA 0.0, Blinkin BLACK (all LEDs off).
-
-
Method Details
-
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
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 nameNullPointerException- 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
About how it looks, as a web color ("#20c040"): for the simulator page.
-