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 Details

    • 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 Details

    • getUpdateInterval

      public int getUpdateInterval()
      Return the update interval in ms.
      Returns:
      The update interval in ms.
    • toString

      public String toString()
      Builds a JSON String describing the I2C input config.
      Overrides:
      toString in class WsI2CInputConfig
      Returns:
      Channel number, address, and update interval.