Package robot.subsystems
Class LightSubsystem
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
robot.subsystems.LightSubsystem
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class LightSubsystem
extends edu.wpi.first.wpilibj2.command.SubsystemBase
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classclass -
Constructor Summary
ConstructorsConstructorDescriptionLightSubsystem(edu.wpi.first.wpilibj.AddressableLED led, int ledLength, int[] lengths, boolean[] reverse) -
Method Summary
Modifier and TypeMethodDescriptionvoidflashColor(int[] color) Flash an RGB color for about a second.voidflashColor(int r, int g, int b) Flash an RGB color for about a second.voidflashColor(int r, int g, int b, int a) Flash an RGB color for about a second.voidperiodic()Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
LightSubsystem
public LightSubsystem(edu.wpi.first.wpilibj.AddressableLED led, int ledLength, int[] lengths, boolean[] reverse)
-
-
Method Details
-
flashColor
public void flashColor(int[] color) Flash an RGB color for about a second. Color is an array of 3 (RGB) or 4 (RGBA) ints from 0-255. -
flashColor
public void flashColor(int r, int g, int b) Flash an RGB color for about a second. Colors are from 0-255. -
flashColor
public void flashColor(int r, int g, int b, int a) Flash an RGB color for about a second. Colors and alpha are from 0-255. -
periodic
public void periodic()
-