Class LEDConfigs
java.lang.Object
com.ctre.phoenix6.configs.LEDConfigs
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptiondoubleThe brightness scalar for all LEDs controlled.The behavior of the LEDs when the control signal is lost.The type of LEDs that are being controlled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final StringGet the serialized form of this configuration group.toString()final LEDConfigswithBrightnessScalar(double newBrightnessScalar) Modifies this configuration's BrightnessScalar parameter and returns itself for method-chaining and easier to use config API.final LEDConfigswithLossOfSignalBehavior(LossOfSignalBehaviorValue newLossOfSignalBehavior) Modifies this configuration's LossOfSignalBehavior parameter and returns itself for method-chaining and easier to use config API.final LEDConfigswithStripType(StripTypeValue newStripType) Modifies this configuration's StripType parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
StripType
The type of LEDs that are being controlled.- Default Value:
StripTypeValue.GRB
- Default Value:
-
BrightnessScalar
public double BrightnessScalarThe 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
The behavior of the LEDs when the control signal is lost.- Default Value:
LossOfSignalBehaviorValue.KeepRunning
- Default Value:
-
-
Constructor Details
-
LEDConfigs
public LEDConfigs()
-
-
Method Details
-
withStripType
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.
- Default Value:
StripTypeValue.GRB
- Parameters:
newStripType- Parameter to modify- Returns:
- Itself
- Default Value:
-
withBrightnessScalar
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
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.
- Default Value:
LossOfSignalBehaviorValue.KeepRunning
- Parameters:
newLossOfSignalBehavior- Parameter to modify- Returns:
- Itself
- Default Value:
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceParentConfiguration- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Parameters:
to_deserialize- The serialized configuration- Returns:
- Return code of the deserialize method
-
clone
-