Class DetachedSignalsConfig

java.lang.Object
com.revrobotics.config.BaseConfig
com.revrobotics.encoder.config.DetachedSignalsConfig

public class DetachedSignalsConfig extends BaseConfig
  • Constructor Details

    • DetachedSignalsConfig

      public DetachedSignalsConfig()
      Create a new object to configure Signals.
  • Method Details

    • apply

      Applies settings from another DetachedSignalsConfig to this one.

      Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

      Parameters:
      config - The DetachedSignalsConfig to copy settings from
      Returns:
      The updated DetachedSignalsConfig for method chaining
    • encoderPositionPeriodMs

      public DetachedSignalsConfig encoderPositionPeriodMs(int periodMs)
      Set the period (ms) of the status frame that provides the signal returned by DetachedEncoder.getPosition(). The default period is 50ms.

      If multiple periods are set for signals within the same status frame, the minimum given value will be used.

      Parameters:
      periodMs - The period in milliseconds
      Returns:
      The modified DetachedSignalsConfig object for method chaining
    • encoderVelocityPeriodMs

      public DetachedSignalsConfig encoderVelocityPeriodMs(int periodMs)
      Set the period (ms) of the status frame that provides the signal returned by DetachedEncoder.getVelocity(). The default period is 50ms.

      If multiple periods are set for signals within the same status frame, the minimum given value will be used.

      Parameters:
      periodMs - The period in milliseconds
      Returns:
      The modified DetachedSignalsConfig object for method chaining
    • encoderAnglePeriodMs

      public DetachedSignalsConfig encoderAnglePeriodMs(int periodMs)
      Set the period (ms) of the status frame that provides the signal returned by DetachedEncoder.getAngle(). The default period is 50ms.

      If multiple periods are set for signals within the same status frame, the minimum given value will be used.

      Parameters:
      periodMs - The period in milliseconds
      Returns:
      The modified DetachedSignalsConfig object for method chaining