Class DigitalInputsConfigs

java.lang.Object
com.ctre.phoenix6.configs.DigitalInputsConfigs
All Implemented Interfaces:
ParentConfiguration, Cloneable

public class DigitalInputsConfigs extends Object implements ParentConfiguration, Cloneable
Configs related to the CANdi™ branded device's digital I/O settings

Contains float-state settings and when to assert the S1/S2 inputs.

  • Field Details

  • Constructor Details

    • DigitalInputsConfigs

      public DigitalInputsConfigs()
  • Method Details

    • withS1FloatState

      public final DigitalInputsConfigs withS1FloatState(S1FloatStateValue newS1FloatState)
      Modifies this configuration's S1FloatState parameter and returns itself for method-chaining and easier to use config API.

      The floating state of the Signal 1 input (S1IN).

      Parameters:
      newS1FloatState - Parameter to modify
      Returns:
      Itself
    • withS2FloatState

      public final DigitalInputsConfigs withS2FloatState(S2FloatStateValue newS2FloatState)
      Modifies this configuration's S2FloatState parameter and returns itself for method-chaining and easier to use config API.

      The floating state of the Signal 2 input (S2IN).

      Parameters:
      newS2FloatState - Parameter to modify
      Returns:
      Itself
    • withS1CloseState

      public final DigitalInputsConfigs withS1CloseState(S1CloseStateValue newS1CloseState)
      Modifies this configuration's S1CloseState parameter and returns itself for method-chaining and easier to use config API.

      What value the Signal 1 input (S1IN) needs to be for the CTR Electronics' CANdi™ to detect as Closed.

      Devices using the S1 input as a remote limit switch will treat the switch as closed when the S1 input is this state.

      Parameters:
      newS1CloseState - Parameter to modify
      Returns:
      Itself
    • withS2CloseState

      public final DigitalInputsConfigs withS2CloseState(S2CloseStateValue newS2CloseState)
      Modifies this configuration's S2CloseState parameter and returns itself for method-chaining and easier to use config API.

      What value the Signal 2 input (S2IN) needs to be for the CTR Electronics' CANdi™ to detect as Closed.

      Devices using the S2 input as a remote limit switch will treat the switch as closed when the S2 input is this state.

      Parameters:
      newS2CloseState - Parameter to modify
      Returns:
      Itself
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • serialize

      public final String serialize()
      Get the serialized form of this configuration group.
      Specified by:
      serialize in interface ParentConfiguration
      Returns:
      Serialized form of this config group
    • deserialize

      public final StatusCode deserialize(String to_deserialize)
      Take a string and deserialize it to this configuration group.
      Specified by:
      deserialize in interface ParentConfiguration
      Parameters:
      to_deserialize - The serialized configuration
      Returns:
      Return code of the deserialize method
    • clone

      public DigitalInputsConfigs clone()
      Overrides:
      clone in class Object