Class FireAnimation
Animation that looks similar to a flame flickering.
public sealed class FireAnimation : ControlRequest, ICloneable
- Inheritance
-
FireAnimation
- Implements
- Inherited Members
Constructors
FireAnimation(int, int)
Animation that looks similar to a flame flickering.
The 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. The 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.public FireAnimation(int LEDStartIndex, int LEDEndIndex)
Parameters
Fields
Brightness
The brightness of the animation, as a scalar from 0.0 to 1.0.
public double Brightness
Field Value
Cooling
The rate at which the fire cools along the travel, as a scalar from 0.0 to 1.0.
public double Cooling
Field Value
Direction
The direction of the animation.
public AnimationDirectionValue Direction
Field Value
FrameRate
The 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.- Units: Hz
public double FrameRate
Field Value
LEDEndIndex
The 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.public int LEDEndIndex
Field Value
LEDStartIndex
The 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.public int LEDStartIndex
Field Value
Slot
The slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
public int Slot
Field Value
Sparking
The proportion of time in which sparks reignite the fire, as a scalar from 0.0 to 1.0.
public double Sparking
Field Value
UpdateFreqHz
The frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.public double UpdateFreqHz
Field Value
Properties
Name
Name of this control request.
public string Name { get; }
Property Value
Methods
Clone()
Creates a copy of this control request.
public FireAnimation Clone()
Returns
GetControlInfo()
Gets information about this control request.
public Dictionary<string, string> GetControlInfo()
Returns
- Dictionary<string, string>
Dictionary of control parameter names and corresponding applied values
SendRequest(string, uint)
Sends this request out over CAN bus to the device for the device to apply.
public StatusCode SendRequest(string network, uint deviceHash)
Parameters
Returns
- StatusCode
Status of the send operation
ToString()
Provides the string representation of this object.
public override string ToString()
Returns
WithBrightness(double)
Modifies this Control Request's Brightness parameter and returns itself for method-chaining and easier to use request API.
The brightness of the animation, as a scalar from 0.0 to 1.0.public FireAnimation WithBrightness(double newBrightness)
Parameters
newBrightnessdoubleParameter to modify
Returns
- FireAnimation
Itself
WithCooling(double)
Modifies this Control Request's Cooling parameter and returns itself for method-chaining and easier to use request API.
The rate at which the fire cools along the travel, as a scalar from 0.0 to 1.0.public FireAnimation WithCooling(double newCooling)
Parameters
newCoolingdoubleParameter to modify
Returns
- FireAnimation
Itself
WithDirection(AnimationDirectionValue)
Modifies this Control Request's Direction parameter and returns itself for method-chaining and easier to use request API.
The direction of the animation.public FireAnimation WithDirection(AnimationDirectionValue newDirection)
Parameters
newDirectionAnimationDirectionValueParameter to modify
Returns
- FireAnimation
Itself
WithFrameRate(double)
Modifies this Control Request's FrameRate parameter and returns itself for method-chaining and easier to use request API.
The 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.- Units: Hz
public FireAnimation WithFrameRate(double newFrameRate)
Parameters
newFrameRatedoubleParameter to modify
Returns
- FireAnimation
Itself
WithLEDEndIndex(int)
Modifies this Control Request's LEDEndIndex parameter and returns itself for method-chaining and easier to use request API.
The 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.public FireAnimation WithLEDEndIndex(int newLEDEndIndex)
Parameters
newLEDEndIndexintParameter to modify
Returns
- FireAnimation
Itself
WithLEDStartIndex(int)
Modifies this Control Request's LEDStartIndex parameter and returns itself for method-chaining and easier to use request API.
The 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.public FireAnimation WithLEDStartIndex(int newLEDStartIndex)
Parameters
newLEDStartIndexintParameter to modify
Returns
- FireAnimation
Itself
WithSlot(int)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to use request API.
The slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.public FireAnimation WithSlot(int newSlot)
Parameters
newSlotintParameter to modify
Returns
- FireAnimation
Itself
WithSparking(double)
Modifies this Control Request's Sparking parameter and returns itself for method-chaining and easier to use request API.
The proportion of time in which sparks reignite the fire, as a scalar from 0.0 to 1.0.public FireAnimation WithSparking(double newSparking)
Parameters
newSparkingdoubleParameter to modify
Returns
- FireAnimation
Itself
WithUpdateFreqHz(double)
Sets the frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.public FireAnimation WithUpdateFreqHz(double newUpdateFreqHz)
Parameters
newUpdateFreqHzdoubleParameter to modify
Returns
- FireAnimation
Itself