Table of Contents

Class CANdleConfiguration

Namespace
CTRE.Phoenix6.Configs
Assembly
Phoenix6.Hardware.dll

Class for CTR Electronics' CANdle® branded device, a device that controls LEDs over the CAN bus.

This defines all configurations for the CANdle.
public class CANdleConfiguration : IParentConfiguration, ISerializable, ICloneable
Inheritance
CANdleConfiguration
Implements
Inherited Members

Fields

CANdleFeatures

Configs related to general CANdle features.

This includes configs such as disabling the 5V rail and the behavior of VBat output.

Parameter list:
public CANdleFeaturesConfigs CANdleFeatures

Field Value

CANdleFeaturesConfigs

CustomParams

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:
public CustomParamsConfigs CustomParams

Field Value

CustomParamsConfigs

FutureProofConfigs

True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.

This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.

This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.
public bool FutureProofConfigs

Field Value

bool

LED

Configs related to CANdle LED control.

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

Parameter list:
public LEDConfigs LED

Field Value

LEDConfigs

Methods

Clone()

Creates a copy of this configuration.

public CANdleConfiguration Clone()

Returns

CANdleConfiguration

Deserialize(string)

Take a string and deserialize it to this configuration

public StatusCode Deserialize(string to_deserialize)

Parameters

to_deserialize string

Returns

StatusCode

Return code of the deserialize method

Serialize()

Get the serialized form of this configuration

public string Serialize()

Returns

string

Serialized form of this config group

ToString()

Provides the string representation of this object

public override string ToString()

Returns

string

WithCANdleFeatures(CANdleFeaturesConfigs)

Modifies this configuration's CANdleFeatures parameter and returns itself for method-chaining and easier to use config API.

Configs related to general CANdle features.

This includes configs such as disabling the 5V rail and the behavior of VBat output.

Parameter list:
public CANdleConfiguration WithCANdleFeatures(CANdleFeaturesConfigs newCANdleFeatures)

Parameters

newCANdleFeatures CANdleFeaturesConfigs

Parameter to modify

Returns

CANdleConfiguration

Itself

WithCustomParams(CustomParamsConfigs)

Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:
public CANdleConfiguration WithCustomParams(CustomParamsConfigs newCustomParams)

Parameters

newCustomParams CustomParamsConfigs

Parameter to modify

Returns

CANdleConfiguration

Itself

WithLED(LEDConfigs)

Modifies this configuration's LED parameter and returns itself for method-chaining and easier to use config API.

Configs related to CANdle LED control.

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

Parameter list:
public CANdleConfiguration WithLED(LEDConfigs newLED)

Parameters

newLED LEDConfigs

Parameter to modify

Returns

CANdleConfiguration

Itself