Table of Contents

Class CoreCANdle

Namespace
CTRE.Phoenix6.Hardware.Core
Assembly
Phoenix6.Hardware.dll

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

public class CoreCANdle : ParentDevice, CommonDevice
Inheritance
CoreCANdle
Implements
Derived
Inherited Members

Constructors

CoreCANdle(int)

Constructs a new CANdle object.

Constructs the device using the default CAN bus for the system (see CANBus(string)).
public CoreCANdle(int deviceId)

Parameters

deviceId int

ID of the device, as configured in Phoenix Tuner

CoreCANdle(int, CANBus)

Constructs a new CANdle object.

public CoreCANdle(int deviceId, CANBus canbus)

Parameters

deviceId int

ID of the device, as configured in Phoenix Tuner

canbus CANBus

The CAN bus this device is on

CoreCANdle(int, string)

Constructs a new CANdle object.

[Obsolete("Constructing devices with a CAN bus string is deprecated for removal in the 2027 season. Construct devices using a CANBus instance instead.")]
public CoreCANdle(int deviceId, string canbus)

Parameters

deviceId int

ID of the device, as configured in Phoenix Tuner

canbus string

Name of the CAN bus. Possible CAN bus strings are:

  • CANivore name or serial number
  • SocketCAN interface (non-FRC Linux only)
  • "" for any CANivore seen by the program
  • empty string (default) to select the default for the system:
    • "can0" on Linux
    • "" on Windows

Properties

Configurator

The configurator for this device. Users may use this to refresh and apply configs, such as the CANdleConfiguration object

public CANdleConfigurator Configurator { get; }

Property Value

CANdleConfigurator

SimState

Gets the simulation state for this device.

This function reuses an allocated simulation state object, so it is safe to call this function multiple times in a robot loop.
public CANdleSimState SimState { get; }

Property Value

CANdleSimState

Methods

ClearStickyFault_5VTooHigh(double)

Clear sticky fault: Device 5V line is too high (above 6 V).

public StatusCode ClearStickyFault_5VTooHigh(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_5VTooLow(double)

Clear sticky fault: Device 5V line is too low (below 4 V).

public StatusCode ClearStickyFault_5VTooLow(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_BootDuringEnable(double)

Clear sticky fault: Device boot while detecting the enable signal

public StatusCode ClearStickyFault_BootDuringEnable(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_Hardware(double)

Clear sticky fault: Hardware fault occurred

public StatusCode ClearStickyFault_Hardware(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_Overvoltage(double)

Clear sticky fault: Device supply voltage is too high (above 30 V).

public StatusCode ClearStickyFault_Overvoltage(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_ShortCircuit(double)

Clear sticky fault: CANdle has detected the output pin is shorted.

public StatusCode ClearStickyFault_ShortCircuit(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_SoftwareFuse(double)

Clear sticky fault: CANdle output current exceeded the 6 A limit.

public StatusCode ClearStickyFault_SoftwareFuse(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_Thermal(double)

Clear sticky fault: Device temperature exceeded limit.

public StatusCode ClearStickyFault_Thermal(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_Undervoltage(double)

Clear sticky fault: Device supply voltage dropped to near brownout levels

public StatusCode ClearStickyFault_Undervoltage(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFault_UnlicensedFeatureInUse(double)

Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.

public StatusCode ClearStickyFault_UnlicensedFeatureInUse(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

ClearStickyFaults(double)

Clear the sticky faults in the device.

This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.
public StatusCode ClearStickyFaults(double timeoutSeconds = 0.1)

Parameters

timeoutSeconds double

Maximum time to wait up to in seconds.

Returns

StatusCode

StatusCode of the set command

GetDeviceTemp(bool)

The temperature that the CANdle measures itself to be at.

  • Minimum Value-128
  • Maximum Value127
  • Default Value0
  • Units

Default Rates:

  • CAN 2.010.0 Hz
  • CAN FD10.0 Hz (TimeSynced with Pro)

This refreshes and returns a cached StatusSignal object.
public StatusSignal<double> GetDeviceTemp(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<double>

DeviceTemp Status Signal Object

GetFaultField(bool)

Integer representing all fault flags reported by the device.

These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.
  • Minimum Value0
  • Maximum Value4294967295
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetFaultField(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

FaultField Status Signal Object

GetFault_5VTooHigh(bool)

Device 5V line is too high (above 6 V).

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_5VTooHigh(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_5VTooHigh Status Signal Object

GetFault_5VTooLow(bool)

Device 5V line is too low (below 4 V).

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_5VTooLow(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_5VTooLow Status Signal Object

GetFault_BootDuringEnable(bool)

Device boot while detecting the enable signal

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_BootDuringEnable(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_BootDuringEnable Status Signal Object

GetFault_Hardware(bool)

Hardware fault occurred

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_Hardware(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_Hardware Status Signal Object

GetFault_Overvoltage(bool)

Device supply voltage is too high (above 30 V).

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_Overvoltage(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_Overvoltage Status Signal Object

GetFault_ShortCircuit(bool)

CANdle has detected the output pin is shorted.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_ShortCircuit(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_ShortCircuit Status Signal Object

GetFault_SoftwareFuse(bool)

CANdle output current exceeded the 6 A limit.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_SoftwareFuse(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_SoftwareFuse Status Signal Object

GetFault_Thermal(bool)

Device temperature exceeded limit.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_Thermal(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_Thermal Status Signal Object

GetFault_Undervoltage(bool)

Device supply voltage dropped to near brownout levels

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_Undervoltage(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_Undervoltage Status Signal Object

GetFault_UnlicensedFeatureInUse(bool)

An unlicensed feature is in use, device may not behave as expected.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetFault_UnlicensedFeatureInUse(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

Fault_UnlicensedFeatureInUse Status Signal Object

GetFiveVRailVoltage(bool)

The measured voltage of the 5V rail line.

  • Minimum Value0.0
  • Maximum Value10.23
  • Default Value0
  • UnitsV

Default Rates:

  • CAN 2.010.0 Hz
  • CAN FD10.0 Hz (TimeSynced with Pro)

This refreshes and returns a cached StatusSignal object.
public StatusSignal<double> GetFiveVRailVoltage(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<double>

FiveVRailVoltage Status Signal Object

GetIsProLicensed(bool)

Whether the device is Phoenix Pro licensed.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetIsProLicensed(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

IsProLicensed Status Signal Object

GetMaxSimultaneousAnimationCount(bool)

The maximum number of simultaneous animations supported by the current version of CANdle firmware.

Any control request using an animation slot greater than or equal to this signal will be ignored.
  • Minimum Value0
  • Maximum Value31
  • Default Value0
  • Units

Default Rates:

  • CAN 2.010.0 Hz
  • CAN FD10.0 Hz (TimeSynced with Pro)

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetMaxSimultaneousAnimationCount(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

MaxSimultaneousAnimationCount Status Signal Object

GetOutputCurrent(bool)

The measured output current. This includes both VBat and 5V output current.

  • Minimum Value0.0
  • Maximum Value10.23
  • Default Value0
  • UnitsA

Default Rates:

  • CAN 2.010.0 Hz
  • CAN FD10.0 Hz (TimeSynced with Pro)

This refreshes and returns a cached StatusSignal object.
public StatusSignal<double> GetOutputCurrent(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<double>

OutputCurrent Status Signal Object

GetStickyFaultField(bool)

Integer representing all (persistent) sticky fault flags reported by the device.

These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.
  • Minimum Value0
  • Maximum Value4294967295
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetStickyFaultField(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

StickyFaultField Status Signal Object

GetStickyFault_5VTooHigh(bool)

Device 5V line is too high (above 6 V).

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_5VTooHigh(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_5VTooHigh Status Signal Object

GetStickyFault_5VTooLow(bool)

Device 5V line is too low (below 4 V).

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_5VTooLow(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_5VTooLow Status Signal Object

GetStickyFault_BootDuringEnable(bool)

Device boot while detecting the enable signal

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_BootDuringEnable(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_BootDuringEnable Status Signal Object

GetStickyFault_Hardware(bool)

Hardware fault occurred

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_Hardware(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_Hardware Status Signal Object

GetStickyFault_Overvoltage(bool)

Device supply voltage is too high (above 30 V).

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_Overvoltage(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_Overvoltage Status Signal Object

GetStickyFault_ShortCircuit(bool)

CANdle has detected the output pin is shorted.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_ShortCircuit(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_ShortCircuit Status Signal Object

GetStickyFault_SoftwareFuse(bool)

CANdle output current exceeded the 6 A limit.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_SoftwareFuse(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_SoftwareFuse Status Signal Object

GetStickyFault_Thermal(bool)

Device temperature exceeded limit.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_Thermal(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_Thermal Status Signal Object

GetStickyFault_Undervoltage(bool)

Device supply voltage dropped to near brownout levels

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_Undervoltage(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_Undervoltage Status Signal Object

GetStickyFault_UnlicensedFeatureInUse(bool)

An unlicensed feature is in use, device may not behave as expected.

  • Default ValueFalse

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<bool> GetStickyFault_UnlicensedFeatureInUse(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<bool>

StickyFault_UnlicensedFeatureInUse Status Signal Object

GetSupplyVoltage(bool)

Measured supply voltage to the CANdle.

  • Minimum Value0.0
  • Maximum Value32.767
  • Default Value0
  • UnitsV

Default Rates:

  • CAN 2.010.0 Hz
  • CAN FD10.0 Hz (TimeSynced with Pro)

This refreshes and returns a cached StatusSignal object.
public StatusSignal<double> GetSupplyVoltage(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<double>

SupplyVoltage Status Signal Object

GetVBatModulation(bool)

The applied VBat modulation duty cycle.

This signal will report 1.0 if the VBatOutputMode is configured to be always on, and 0.0 if configured to be always off. Otherwise, this will report the applied modulation from the last ModulateVBatOut request.
  • Minimum Value0.0
  • Maximum Value1.0
  • Default Value0
  • Unitsfrac

Default Rates:

  • CAN 2.010.0 Hz
  • CAN FD10.0 Hz (TimeSynced with Pro)

This refreshes and returns a cached StatusSignal object.
public StatusSignal<double> GetVBatModulation(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<double>

VBatModulation Status Signal Object

GetVersion(bool)

Full Version of firmware in device. The format is a four byte value.

  • Minimum Value0
  • Maximum Value4294967295
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetVersion(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

Version Status Signal Object

GetVersionBugfix(bool)

App Bugfix Version number.

  • Minimum Value0
  • Maximum Value255
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetVersionBugfix(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

VersionBugfix Status Signal Object

GetVersionBuild(bool)

App Build Version number.

  • Minimum Value0
  • Maximum Value255
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetVersionBuild(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

VersionBuild Status Signal Object

GetVersionMajor(bool)

App Major Version number.

  • Minimum Value0
  • Maximum Value255
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetVersionMajor(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

VersionMajor Status Signal Object

GetVersionMinor(bool)

App Minor Version number.

  • Minimum Value0
  • Maximum Value255
  • Default Value0
  • Units

Default Rates:

  • CAN4.0 Hz

This refreshes and returns a cached StatusSignal object.
public StatusSignal<int> GetVersionMinor(bool refresh = true)

Parameters

refresh bool

Whether to refresh the StatusSignal before returning it; defaults to true

Returns

StatusSignal<int>

VersionMinor Status Signal Object

SetControl(ColorFlowAnimation)

Animation that gradually lights the entire LED strip one LED at a time.

ColorFlowAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip

    If the start index is greater than the end index, the direction will be reversed. The direction can also be changed using the Direction parameter.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.

    If the end index is less than the start index, the direction will be reversed. The direction can also be changed using the Direction parameter.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • ColorThe color to use in the animation.
  • DirectionThe direction of the animation.
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, turning one on or off.
public StatusCode SetControl(ColorFlowAnimation request)

Parameters

request ColorFlowAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(ControlRequest)

Control device with generic control request object.

User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the NotSupported StatusCode
public StatusCode SetControl(ControlRequest request)

Parameters

request ControlRequest

Control object to request of the device

Returns

StatusCode

Status Code of the request, 0 is OK

SetControl(EmptyAnimation)

An empty animation, clearing any animation in the specified slot.

EmptyAnimation Parameters

  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
public StatusCode SetControl(EmptyAnimation request)

Parameters

request EmptyAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(FireAnimation)

Animation that looks similar to a flame flickering.

FireAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip

    If the start index is greater than the end index, the direction will be reversed. The direction can also be changed using the Direction parameter.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.

    If the end index is less than the start index, the direction will be reversed. The direction can also be changed using the Direction parameter.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • BrightnessThe brightness of the animation, as a scalar from 0.0 to 1.0.
  • DirectionThe direction of the animation.
  • SparkingThe proportion of time in which sparks reignite the fire, as a scalar from 0.0 to 1.0.
  • CoolingThe rate at which the fire cools along the travel, as a scalar from 0.0 to 1.0.
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, advancing the animation of the fire.
public StatusCode SetControl(FireAnimation request)

Parameters

request FireAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(LarsonAnimation)

Animation that bounces a pocket of light across the LED strip.

LarsonAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • ColorThe color to use in the animation.
  • SizeThe number of LEDs in the pocket of light, up to 15.
  • BounceModeThe behavior of the pocket of light when it reaches the end of the strip.
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, advancing the pocket of light by one LED.
public StatusCode SetControl(LarsonAnimation request)

Parameters

request LarsonAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(ModulateVBatOut)

Modulates the CANdle VBat output to the specified duty cycle. This can be used to control a single-color LED strip.

Note that CANdleFeaturesConfigs.VBatOutputMode must be set to VBatOutputModeValue.Modulated.

ModulateVBatOut Parameters

  • OutputProportion of VBat to output in fractional units between 0.0 and 1.0.
public StatusCode SetControl(ModulateVBatOut request)

Parameters

request ModulateVBatOut

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(RainbowAnimation)

Animation that creates a rainbow throughout all the LEDs.

RainbowAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip

    If the start index is greater than the end index, the direction will be reversed. The direction can also be changed using the Direction parameter.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.

    If the end index is less than the start index, the direction will be reversed. The direction can also be changed using the Direction parameter.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • BrightnessThe brightness of the animation, as a scalar from 0.0 to 1.0.
  • DirectionThe direction of the animation.
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, advancing the rainbow by about 3 degrees of hue (out of 360 degrees).
public StatusCode SetControl(RainbowAnimation request)

Parameters

request RainbowAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(RgbFadeAnimation)

Animation that fades all the LEDs of a strip simultaneously between Red, Green, and Blue.

RgbFadeAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • BrightnessThe brightness of the animation, as a scalar from 0.0 to 1.0.
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, adjusting the brightness of the LEDs by 1%.
public StatusCode SetControl(RgbFadeAnimation request)

Parameters

request RgbFadeAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(SingleFadeAnimation)

Animation that fades into and out of a specified color.

SingleFadeAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • ColorThe color to use in the animation.
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, adjusting the brightness of the LEDs by 1%.
public StatusCode SetControl(SingleFadeAnimation request)

Parameters

request SingleFadeAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(SolidColor)

Sets LEDs to a solid color.

SolidColor Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • ColorThe color to apply to the LEDs.
public StatusCode SetControl(SolidColor request)

Parameters

request SolidColor

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(StrobeAnimation)

Animation that strobes the LEDs a specified color.

StrobeAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • ColorThe color to use in the animation.
  • FrameRateThe frame rate of the animation, from [1, 500] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, turning all LEDs on or off.
public StatusCode SetControl(StrobeAnimation request)

Parameters

request StrobeAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(TwinkleAnimation)

Animation that randomly turns LEDs on and off to a certain color.

TwinkleAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • ColorThe color to use in the animation.
  • MaxLEDsOnProportionThe max proportion of LEDs that can be on, in the range [0.1, 1.0].
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, turning one on or off.
public StatusCode SetControl(TwinkleAnimation request)

Parameters

request TwinkleAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(TwinkleOffAnimation)

Animation that randomly turns on LEDs until it reaches the maximum count, and then turns them all off.

TwinkleOffAnimation Parameters

  • LEDStartIndexThe index of the first LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • LEDEndIndexThe index of the last LED this animation controls (inclusive). Indices 0-7 control the onboard LEDs, and 8-399 control an attached LED strip.
  • SlotThe slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • ColorThe color to use in the animation.
  • MaxLEDsOnProportionThe max proportion of LEDs that can be on, in the range [0.1, 1.0].
  • FrameRateThe frame rate of the animation, from [2, 1000] Hz. This determines the speed of the animation.

    A frame is defined as a transition in the state of the LEDs, turning one LED on or all LEDs off.
public StatusCode SetControl(TwinkleOffAnimation request)

Parameters

request TwinkleOffAnimation

Control object to request of the device

Returns

StatusCode

Code response of the request