Class DigitalInputsConfigs

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

public class DigitalInputsConfigs extends Object implements ParentConfiguration
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

    • S1FloatState

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

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

      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.

    • S2CloseState

      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.

  • Constructor Details

  • Method Details

    • withS1FloatState

      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

      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

      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

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

      public StatusCode deserialize(String to_deserialize)
      Specified by:
      deserialize in interface ParentConfiguration
    • serialize

      public String serialize()
      Specified by:
      serialize in interface ISerializable