Class LEDMulticolor
java.lang.Object
io.github.roboblazers7617.buttonbox.Control
io.github.roboblazers7617.buttonbox.controls.LED
io.github.roboblazers7617.buttonbox.controls.LEDMulticolor
- Direct Known Subclasses:
PhysicalLEDRGB,PhysicalLEDRGBLaunchpad
A multicolor indicator LED.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Gets the color of the LED.voidSets the color of the LED from a WPILibColor.voidSets the color of the LED.voidsetupNetworkTables(NetworkTable table) Called by the Control class when the NetworkTable is set byControl.setTable(NetworkTable).voidUpdates the control's state on the client.Methods inherited from class io.github.roboblazers7617.buttonbox.controls.LED
getBrightness, setBrightness, setupSimulation, updateServerMethods inherited from class io.github.roboblazers7617.buttonbox.Control
getId, getTable, setTable, updateHardware, updateOnClient
-
Constructor Details
-
LEDMulticolor
Creates a new LED.- Parameters:
id- The ID string for the LED to use.
-
-
Method Details
-
setupNetworkTables
Description copied from class:ControlCalled by the Control class when the NetworkTable is set byControl.setTable(NetworkTable). intended to be called outside of the class.This should create all of the NetworkTables publishers and subscribers for the inheritting class.
- Overrides:
setupNetworkTablesin classLED- Parameters:
table- The table to use. When called byControl.setTable(NetworkTable), this is a subtable with the ID string as its key.
-
updateClient
public void updateClient()Description copied from class:ControlUpdates the control's state on the client. This should get any feedback from the server, but this should not interface with the buttonbox hardware.This doesn't do anything by default, and should be overridden by the class inheritting this.
- Overrides:
updateClientin classLED
-
getColor
Gets the color of the LED.- Returns:
- The current color of the LED.
-
setColor
Sets the color of the LED. Published to NetworkTables immediately.- Parameters:
color- The color to set.
-
setColor
Sets the color of the LED from a WPILibColor. Published to NetworkTables immediately.- Parameters:
color- The color to set.
-