public class WheelLights
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WheelLights.Direction
Wheel lights direction.
|
static class |
WheelLights.Lights
Wheel lights ID
|
static class |
WheelLights.Pattern
Wheel lights pattern.
|
Modifier and Type | Field and Description |
---|---|
static int |
CHARGING_TYPE_BIDIRECTIONAL |
static int |
CHARGING_TYPE_UNIDIRECTIONAL |
Modifier and Type | Method and Description |
---|---|
int |
setBrightness(WheelLights.Lights id,
int active,
int bright)
Set the brightness of wheel LEDs.
|
int |
setBrightness(WheelLights.Lights id,
int active,
int bright,
boolean immediately)
Set the brightness of wheel LEDs.
|
int |
setColor(WheelLights.Lights id,
int active,
int color)
Set the color of wheel LEDs.
|
int |
startBlinking(WheelLights.Lights id,
int active,
int brightTime,
int darkTime,
int cycleNumber)
Start the blinking pattern.
|
int |
startBreathing(WheelLights.Lights id,
int active,
int darkToBrightTime,
int brightToDarkTime,
int cycleNumber)
Start the breathing pattern action.
|
int |
startMarquee(WheelLights.Lights id,
WheelLights.Direction direction,
int colorShiftTime,
int brightTime,
int cycleNumber)
Start the marquee pattern action.
|
int |
turnOff(WheelLights.Lights id,
int active)
Stop the pattern set by startPattern.
|
public static final int CHARGING_TYPE_BIDIRECTIONAL
public static final int CHARGING_TYPE_UNIDIRECTIONAL
public int setBrightness(WheelLights.Lights id, int active, int bright)
id
- wheel lights IDactive
- bitmap array of selected LED. bit7~bit0 corresponds to LED7~LED0,
set the corresponding bit to specify the selected LEDsbright
- bright value in the range from 0 to 55, 0 means turning off the lightpublic int setBrightness(WheelLights.Lights id, int active, int bright, boolean immediately)
id
- wheel lights IDactive
- bitmap array of selected LED. bit7~bit0 corresponding LED7~LED0.
Set the corresponded bit to specify the selected LEDs.bright
- bright value in the range from 0 to 55, 0 means turning off the light.immediately
- true
change brightness immediately, false
will change with next pattern start or setColorpublic int setColor(WheelLights.Lights id, int active, int color)
id
- wheel lights IDactive
- bitmap array of selected LED. bit7~bit0 corresponding LED7~LED0.
Set the cooresponed bit to specify the selected LEDs.color
- color value in ARGB format
(e.g. RED is 0x00ff0000, GREEN is 0x0000ff00, BLUE is 0x000000ff)public int startBlinking(WheelLights.Lights id, int active, int brightTime, int darkTime, int cycleNumber)
id
- wheel lights IDactive
- bitmap array of selected LED. bit7~bit0 corresponding LED7~LED0.
Set the cooresponed bit to specify the selected LEDs.brightTime
- parameter for on time,
value in the range from (1~255)*10msdarkTime
- parameter for off time,
value in the range from (1~255)*10mscycleNumber
- number of cycles, value in the range from 0~255,
0 means that the pattern will run forever until stop_pattern is called
(When the cycleNumber expired, although the light will be turned off,
you will still need to call the stop_pattern to disable the pattern.)WheelLights.turnOff(Lights, int)
public int startBreathing(WheelLights.Lights id, int active, int darkToBrightTime, int brightToDarkTime, int cycleNumber)
id
- wheel lights IDactive
- bitmap array of selected LED. bit7~bit0 corresponding LED7~LED0.
Set the cooresponed bit to specify the selected LEDs.darkToBrightTime
- parameter for the time between darkest to brightest,
value in the range from (1~20)*0.5sbrightToDarkTime
- for the time between brightest to darkest,
value in the range from (1~20)*0.5scycleNumber
- number of cycles, value in the range from 0~255,
0 means that the pattern will run forever until stop_pattern is called
(When the cycleNumber expired, although the light will be turned off,
you will still need to call the stop_pattern to disable the pattern.)WheelLights.turnOff(Lights, int)
public int startMarquee(WheelLights.Lights id, WheelLights.Direction direction, int colorShiftTime, int brightTime, int cycleNumber)
id
- wheel lights IDdirection
- forward or backwardcolorShiftTime
- parameter for color shift time,
value in the range from (1~255)*10msbrightTime
- parameter for active time between each LED,
value in the range from (1~255)*10ms
Note: For Marquee, (t1 x 2) < (t2 x 9)cycleNumber
- then cycleNumber of run 0~255WheelLights.turnOff(Lights, int)
public int turnOff(WheelLights.Lights id, int active)
id
- wheel lights IDactive
- bitmap array of selected LED. bit7~bit0 corresponding LED7~LED0.
Set the cooresponed bit to specify the selected LEDs.