Class AddressableLEDJNI
- See Also:
-
- "hal/AddressableLED.h"
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.hal.JNIWrapper
JNIWrapper.Helper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
free
(int handle) Free the Addressable LED Handle.static int
initialize
(int channel) Create a new instance of an Addressable LED port.static void
setData
(int outStart, int colorOrder, byte[] data) Sets the led output data.static void
setData
(int outStart, int colorOrder, byte[] data, int start, int len) Sets the led output data.static void
setData
(int outStart, int colorOrder, ByteBuffer data) Sets the led output data.static void
setData
(int outStart, int colorOrder, ByteBuffer data, int start, int len) Sets the led output data.static void
setLength
(int handle, int length) Sets the length of the LED strip.static void
setStart
(int handle, int start) Sets the start buffer location used for the LED strip.Methods inherited from class edu.wpi.first.hal.JNIWrapper
forceLoad, suppressUnused
-
Field Details
-
COLOR_ORDER_RGB
- See Also:
-
COLOR_ORDER_RBG
- See Also:
-
COLOR_ORDER_BGR
- See Also:
-
COLOR_ORDER_BRG
- See Also:
-
COLOR_ORDER_GBR
- See Also:
-
COLOR_ORDER_GRB
- See Also:
-
-
Method Details
-
initialize
Create a new instance of an Addressable LED port.- Parameters:
channel
- the smartio channel- Returns:
- Addressable LED handle
- See Also:
-
- "HAL_InitializeAddressableLED"
-
free
Free the Addressable LED Handle.- Parameters:
handle
- the Addressable LED handle to free- See Also:
-
- "HAL_FreeAddressableLED"
-
setStart
Sets the start buffer location used for the LED strip.All addressable LEDs use a single backing buffer 1024 LEDs in size. The max length for a single output is 1024 LEDs (with an offset of zero).
- Parameters:
handle
- the Addressable LED handlestart
- the strip start, in LEDs
-
setLength
Sets the length of the LED strip.All addressable LEDs use a single backing buffer 1024 LEDs in size. The max length for a single output is 1024 LEDs (with an offset of zero).
- Parameters:
handle
- the Addressable LED handlelength
- the strip length, in LEDs
-
setData
Sets the led output data.All addressable LEDs use a single backing buffer 1024 LEDs in size. This function may be used to set part of or all of the buffer.
- Parameters:
outStart
- the strip start in the backing buffer, in LEDscolorOrder
- the color orderdata
- the buffer to write- See Also:
-
- "HAL_WriteAddressableLEDData"
-
setData
Sets the led output data.All addressable LEDs use a single backing buffer 1024 LEDs in size. This function may be used to set part of or all of the buffer.
- Parameters:
outStart
- the strip start in the backing buffer, in LEDscolorOrder
- the color orderdata
- the buffer to writestart
- offset into data, in byteslen
- Length of data, in bytes
-
setData
Sets the led output data.All addressable LEDs use a single backing buffer 1024 LEDs in size. This function may be used to set part of or all of the buffer.
- Parameters:
outStart
- the strip start in the backing buffer, in LEDscolorOrder
- the color orderdata
- the buffer to write
-
setData
Sets the led output data.All addressable LEDs use a single backing buffer 1024 LEDs in size. This function may be used to set part of or all of the buffer.
- Parameters:
outStart
- the strip start in the backing buffer, in LEDscolorOrder
- the color orderdata
- the buffer to writestart
- offset into data, in byteslen
- Length of data, in bytes
-