Class LEDConfigs

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

public class LEDConfigs extends Object implements ParentConfiguration, Cloneable
Configs related to CANdle LED control.

All the configs related to controlling LEDs with the CANdle, including LED strip type and brightness.

  • Field Details

    • StripType

      public StripTypeValue StripType
      The type of LEDs that are being controlled.
    • BrightnessScalar

      public double BrightnessScalar
      The brightness scalar for all LEDs controlled. All LED values sent to the CANdle will be scaled by this config.
      • Minimum Value: 0.0
      • Maximum Value: 1.0
      • Default Value: 1.0
      • Units: scalar
    • LossOfSignalBehavior

      public LossOfSignalBehaviorValue LossOfSignalBehavior
      The behavior of the LEDs when the control signal is lost.
  • Constructor Details

    • LEDConfigs

      public LEDConfigs()
  • Method Details

    • withStripType

      public final LEDConfigs withStripType(StripTypeValue newStripType)
      Modifies this configuration's StripType parameter and returns itself for method-chaining and easier to use config API.

      The type of LEDs that are being controlled.

      Parameters:
      newStripType - Parameter to modify
      Returns:
      Itself
    • withBrightnessScalar

      public final LEDConfigs withBrightnessScalar(double newBrightnessScalar)
      Modifies this configuration's BrightnessScalar parameter and returns itself for method-chaining and easier to use config API.

      The brightness scalar for all LEDs controlled. All LED values sent to the CANdle will be scaled by this config.

      • Minimum Value: 0.0
      • Maximum Value: 1.0
      • Default Value: 1.0
      • Units: scalar
      Parameters:
      newBrightnessScalar - Parameter to modify
      Returns:
      Itself
    • withLossOfSignalBehavior

      public final LEDConfigs withLossOfSignalBehavior(LossOfSignalBehaviorValue newLossOfSignalBehavior)
      Modifies this configuration's LossOfSignalBehavior parameter and returns itself for method-chaining and easier to use config API.

      The behavior of the LEDs when the control signal is lost.

      Parameters:
      newLossOfSignalBehavior - 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 LEDConfigs clone()
      Overrides:
      clone in class Object