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 Classes
    Modifier and Type
    Class
    Description
    static final class 
     
    class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LightSubsystem(edu.wpi.first.wpilibj.AddressableLED led, int ledLength, int[] lengths, boolean[] reverse)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    flashColor(int[] color)
    Flash an RGB color for about a second.
    void
    flashColor(int r, int g, int b)
    Flash an RGB color for about a second.
    void
    flashColor(int r, int g, int b, int a)
    Flash an RGB color for about a second.
    void
     

    Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase

    addChild, getName, getSubsystem, initSendable, setName, setSubsystem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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()