Package frclib.driverio
Class FrcAddressableLED
java.lang.Object
trclib.driverio.TrcPriorityIndicator<TrcAddressableLED.Pattern>
trclib.driverio.TrcAddressableLED
frclib.driverio.FrcAddressableLED
This class implements a platform dependent Addressable LED device. It uses the WPILib AddressableLED class
and provides methods to update the color pattern of the LED strip.
-
Nested Class Summary
Nested classes/interfaces inherited from class trclib.driverio.TrcAddressableLED
TrcAddressableLED.Pattern
-
Field Summary
Fields inherited from class trclib.driverio.TrcAddressableLED
currPattern, numLEDs
Fields inherited from class trclib.driverio.TrcPriorityIndicator
instanceName, tracer
-
Constructor Summary
ConstructorsConstructorDescriptionFrcAddressableLED
(String instanceName, int numLEDs, int channel) Constructor: Create an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
reset()
This method resets the LED strip by turning all LEDs off.void
setEnabled
(boolean enabled) This method enables/disables the AddressableLED device.void
This method update the LED strip to the current pattern.Methods inherited from class trclib.driverio.TrcAddressableLED
getPattern, setColor, setHSV, setPattern, setRGB
Methods inherited from class trclib.driverio.TrcPriorityIndicator
getPatternPriority, getPatternState, getPatternState, printPatternPriorityTable, resetAllPatternStates, setPatternPriorities, setPatternState, setPatternState, setPatternState, setPatternState, setPatternState, setPatternState, toString
-
Constructor Details
-
FrcAddressableLED
Constructor: Create an instance of the object.- Parameters:
instanceName
- specifies the instance name.numLEDs
- specifies the number of LEDs on the strip.channel
- specifies the PWM channel the device is on.
-
-
Method Details
-
reset
public void reset()This method resets the LED strip by turning all LEDs off.- Overrides:
reset
in classTrcPriorityIndicator<TrcAddressableLED.Pattern>
-
setEnabled
public void setEnabled(boolean enabled) This method enables/disables the AddressableLED device.- Parameters:
enabled
- specifies true to enable the device, false to disable.
-
updateLED
This method update the LED strip to the current pattern.- Specified by:
updateLED
in classTrcAddressableLED
-