Class QueueLightshow
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
com.team2813.lib2813.subsystems.lightshow.Lightshow
com.team2813.lib2813.subsystems.lightshow.QueueLightshow
A lightshow that changes color when a State transitions from inactive to active.
All states that return true on a call to State.isActive() are pushed to a
deque. States are only removed from the deque if they are at the front and State.isActive() returns false. When a state is removed, the next one will be activated
if State.isActive() returns true, until either a state returns true upon
a call to State.isActive(), in which the color will be used, or there are no states where
State.isActive() return true, then the default color is used.
For example usage, see FRC Team 2813's 2024 robot code.
-
Field Summary
Fields inherited from class com.team2813.lib2813.subsystems.lightshow.Lightshow
defaultState, off, states -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.team2813.lib2813.subsystems.lightshow.Lightshow
addStates, addStates, periodic, setDefaultState, useColorMethods 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
-
QueueLightshow
-
QueueLightshow
-
-
Method Details
-
update
Description copied from class:LightshowUpdates the current States. Makes the currentLightshow.statesupdated, and gets the Color to be displayed.
-