Class WsContinuousI2CInputConfig
- java.lang.Object
-
- org.wildstang.hardware.roborio.inputs.config.WsI2CInputConfig
-
- org.wildstang.hardware.roborio.inputs.config.WsContinuousI2CInputConfig
-
- All Implemented Interfaces:
InputConfig
- Direct Known Subclasses:
WsLidarInputConfig
public class WsContinuousI2CInputConfig extends WsI2CInputConfig
Wrapper class to identify hall effect sensors separate from I2C inputs.
-
-
Constructor Summary
Constructors Constructor Description WsContinuousI2CInputConfig(edu.wpi.first.wpilibj.I2C.Port port, int address)
Construct the hall effect sensor config with the default update interval (20 ms).WsContinuousI2CInputConfig(edu.wpi.first.wpilibj.I2C.Port port, int address, int updateInterval)
Construct the hall effect sensor config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getUpdateInterval()
Return the update interval in ms.java.lang.String
toString()
Builds a JSON String describing the I2C input config.-
Methods inherited from class org.wildstang.hardware.roborio.inputs.config.WsI2CInputConfig
getAddress, getPort
-
-
-
-
Constructor Detail
-
WsContinuousI2CInputConfig
public WsContinuousI2CInputConfig(edu.wpi.first.wpilibj.I2C.Port port, int address)
Construct the hall effect sensor config with the default update interval (20 ms).- Parameters:
port
- Hardware port number the sensor is connected to.address
- I2C address of the sensor.
-
WsContinuousI2CInputConfig
public WsContinuousI2CInputConfig(edu.wpi.first.wpilibj.I2C.Port port, int address, int updateInterval)
Construct the hall effect sensor config.- Parameters:
port
- Hardware port number the sensor is connected to.address
- I2C address of the sensor.updateInterval
- Number of milliseconds between updates.
-
-
Method Detail
-
getUpdateInterval
public int getUpdateInterval()
Return the update interval in ms.- Returns:
- The update interval in ms.
-
toString
public java.lang.String toString()
Builds a JSON String describing the I2C input config.- Overrides:
toString
in classWsI2CInputConfig
- Returns:
- Channel number, address, and update interval.
-
-