@ServoType(flavor=CUSTOM, usPulseLower=500.0, usPulseUpper=2500.0) @DeviceProperties(xmlTag="RevBlinkinLedDriver", name="@string/rev_blinkin_name", description="@string/rev_blinkin_description", builtIn=true, compatibleControlSystems=REV_HUB) public class RevBlinkinLedDriver extends java.lang.Object implements HardwareDevice
Modifier and Type | Class and Description |
---|---|
static class |
RevBlinkinLedDriver.BlinkinPattern |
HardwareDevice.Manufacturer
Modifier and Type | Field and Description |
---|---|
protected static double |
BASE_SERVO_POSITION |
protected ServoControllerEx |
controller |
protected static int |
PATTERN_OFFSET |
protected static double |
PULSE_WIDTH_INCREMENTOR |
protected static java.lang.String |
TAG |
Constructor and Description |
---|
RevBlinkinLedDriver(ServoControllerEx controller,
int port)
RevBlinkinLedDriver
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this device
|
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
int |
getVersion()
Version
|
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
void |
setPattern(RevBlinkinLedDriver.BlinkinPattern pattern)
setPattern
|
protected static final java.lang.String TAG
protected static final double PULSE_WIDTH_INCREMENTOR
protected static final double BASE_SERVO_POSITION
protected static final int PATTERN_OFFSET
protected ServoControllerEx controller
public RevBlinkinLedDriver(ServoControllerEx controller, int port)
controller
- A REV servo controllerport
- the port that the driver is connected topublic void setPattern(RevBlinkinLedDriver.BlinkinPattern pattern)
pattern
- the BlinkinPattern to displaypublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevice
getManufacturer
in interface HardwareDevice
public java.lang.String getDeviceName()
HardwareDevice
getDeviceName
in interface HardwareDevice
public java.lang.String getConnectionInfo()
HardwareDevice
getConnectionInfo
in interface HardwareDevice
public int getVersion()
HardwareDevice
getVersion
in interface HardwareDevice
public void resetDeviceConfigurationForOpMode()
HardwareDevice
resetDeviceConfigurationForOpMode
in interface HardwareDevice
public void close()
HardwareDevice
close
in interface HardwareDevice