public final class LightDriveCAN
extends java.lang.Object
Constructor and Description |
---|
LightDriveCAN()
Creates an instance of LightDriveCAN to control the LightDrive12 via CANbus.
|
LightDriveCAN(int addr)
Create an instance of LightDriveCAN with specified address for using more than one LightDrive
|
Modifier and Type | Method and Description |
---|---|
float |
GetCurrent(int ch)
Return the approximate current from the specified channel bank
|
int |
GetFWVersion()
Returns the attached LightDrive's firmware version
|
int |
GetPWMs(int ch)
Returns the PWM input value for the given channel
NOTE: Firmware V2 only
|
Status |
GetStatus()
Returns a Status class for the LightDrive
|
float |
GetTotalCurrent()
Returns the total approximate LightDrive current.
|
float |
GetVoltage()
Returns the LightDrive input voltage
|
void |
SetColor(int ch,
java.awt.Color color)
Set the given channel's Color
|
void |
SetColor(int ch,
java.awt.Color color,
double brightness)
Set the given channel's Color with a brightness scalar
|
void |
SetLevel(int ch,
byte level)
Sets the raw pwm output value for a desired channel
|
void |
Update()
Send new data to LightDrive.
|
public LightDriveCAN()
public LightDriveCAN(int addr)
addr
- Int indicating the number of the LightDrive (1-3)public void Update()
public float GetCurrent(int ch)
ch
- Int (1-4) indicating the desired bank to read frompublic float GetTotalCurrent()
public float GetVoltage()
public int GetFWVersion()
public Status GetStatus()
public int GetPWMs(int ch)
ch
- Int (1-2) representing the desired input to read frompublic void SetColor(int ch, java.awt.Color color)
ch
- Int (1-4) representing the desired bank of channels to setcolor
- Color class representing the desired Colorpublic void SetColor(int ch, java.awt.Color color, double brightness)
ch
- Int (1-4) representing the desired bank of channels to setcolor
- Color class representing the desired Colorbrightness
- Double representing the desired brightness scaled 0.0 to 1.0public void SetLevel(int ch, byte level)
ch
- Int (1-12) representing the desired channellevel
- Byte (0-255) representing the desired duty cycle scaled 0 to 255