Class SoftLimitConfig

java.lang.Object
com.revrobotics.spark.config.BaseConfig
com.revrobotics.spark.config.SoftLimitConfig

public class SoftLimitConfig extends BaseConfig
  • Constructor Details

    • SoftLimitConfig

      public SoftLimitConfig()
  • Method Details

    • apply

      public SoftLimitConfig apply(SoftLimitConfig config)
      Applies settings from another SoftLimitConfig 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 SoftLimitConfig to copy settings from
      Returns:
      The updated SoftLimitConfig for method chaining
    • forwardSoftLimit

      public SoftLimitConfig forwardSoftLimit(double limit)
      Set the forward soft limit based on the position of the selected feedback sensor. This will disable motor actuation in the forward direction past this position. This value should have the position conversion factor applied to it.
      Parameters:
      limit - The forward soft limit position with the conversion factor applied
      Returns:
      The modified SoftLimitConfig object for method chaining
    • forwardSoftLimitEnabled

      public SoftLimitConfig forwardSoftLimitEnabled(boolean enabled)
      Set whether to enable or disable the forward soft limit.
      Parameters:
      enabled - True to enable the forward soft limit
      Returns:
      The modified SoftLimitConfig object for method chaining
    • reverseSoftLimit

      public SoftLimitConfig reverseSoftLimit(double limit)
      Set the reverse soft limit based on the position of the selected feedback sensor. This will disable motor actuation in the reverse direction past this position. This value should have the position conversion factor applied to it.
      Parameters:
      limit - The reverse soft limit position with the conversion factor applied
      Returns:
      The modified SoftLimitConfig object for method chaining
    • reverseSoftLimitEnabled

      public SoftLimitConfig reverseSoftLimitEnabled(boolean enabled)
      Set whether to enable or disable the reverse soft limit.
      Parameters:
      enabled - True to enable the reverse soft limit
      Returns:
      The modified SoftLimitConfig object for method chaining