Class WsI2CInput
java.lang.Object
org.wildstang.framework.io.inputs.Input
org.wildstang.framework.io.inputs.I2CInput
org.wildstang.hardware.roborio.inputs.WsI2CInput
- Direct Known Subclasses:
WsContinuousI2CInput
Reads an I2C input.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWsI2CInput(String name, edu.wpi.first.wpilibj.I2C.Port port, int p_address) Construct the I2C input. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]Reads the raw value from the I2C input.Methods inherited from class org.wildstang.framework.io.inputs.I2CInput
getValue, readDataFromInput, setValueMethods inherited from class org.wildstang.framework.io.inputs.Input
addInputListener, disable, enable, getInputListeners, getName, hasValueChanged, isEnabled, notifyListeners, removeAllListeners, removeInputListener, setValueChanged, update
-
Field Details
-
i2c
protected edu.wpi.first.wpilibj.I2C i2c
-
-
Constructor Details
-
WsI2CInput
Construct the I2C input.- Parameters:
name- Descriptive name of the input.port- Hardware I2C input used.p_address- Device I2C address.
-
-
Method Details
-
readRawValue
protected byte[] readRawValue()Reads the raw value from the I2C input.- Specified by:
readRawValuein classI2CInput- Returns:
- Raw input value.
-