Package frclib.archive
Class FrcI2cLEDPanel
java.lang.Object
trclib.archive.TrcI2cLEDPanel
frclib.archive.FrcI2cLEDPanel
This class implements a platform dependent I2C LED panel device. It extends the platform independent counterpart
and provides platform dependent access to the I2C device.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final edu.wpi.first.wpilibj.I2C.Port -
Constructor Summary
ConstructorsConstructorDescriptionFrcI2cLEDPanel(String instanceName, edu.wpi.first.wpilibj.I2C.Port port) Constructor: Create an instance of the object.FrcI2cLEDPanel(String instanceName, edu.wpi.first.wpilibj.I2C.Port port, int devAddress) Constructor: Create an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionvoidasyncWriteData(byte[] data) This method writes the data buffer to the device asynchronously.booleanThis method checks if the device is enabled.voidsetEnabled(boolean enabled) This method enables/disables the device.Methods inherited from class trclib.archive.TrcI2cLEDPanel
clearAllTextLines, clearTextLine, color, setDelay, setTextLine, toString
-
Field Details
-
DEF_I2C_PORT
public static final edu.wpi.first.wpilibj.I2C.Port DEF_I2C_PORT -
DEF_I2C_ADDRESS
public static final int DEF_I2C_ADDRESS- See Also:
-
-
Constructor Details
-
FrcI2cLEDPanel
Constructor: Create an instance of the object.- Parameters:
instanceName- specifies the instance name.port- specifies the I2C port on the RoboRIO.devAddress- specifies the I2C address of the device.
-
FrcI2cLEDPanel
Constructor: Create an instance of the object.- Parameters:
instanceName- specifies the instance name.port- specifies the I2C port on the RoboRIO.
-
-
Method Details
-
isEnabled
public boolean isEnabled()This method checks if the device is enabled.- Returns:
- true if the device is enabled, false otherwise.
-
setEnabled
public void setEnabled(boolean enabled) This method enables/disables the device.- Parameters:
enabled- specifies true to enable the device, false to disable.
-
asyncWriteData
public void asyncWriteData(byte[] data) This method writes the data buffer to the device asynchronously.- Specified by:
asyncWriteDatain classTrcI2cLEDPanel- Parameters:
data- specifies the data buffer.
-