001package com.ctre.phoenix.led;
002
003/**
004 * Animation that looks similarly to a flame flickering
005 */
006public class FireAnimation extends BaseStandardAnimation {
007    /**
008     * Constructor for a FireAnimation
009     * @param brightness How bright should the animation be [0, 1]
010     * @param speed How fast will the flame be processed at [0, 1]
011     * @param numLed How many LEDs is the CANdle controlling
012     * @param sparking The rate at which the Fire "Sparks" [0, 1]
013     * @param cooling The rate at which the Fire "Cools" along the travel [0, 1]
014     */
015    public FireAnimation(double brightness, double speed, int numLed, double sparking, double cooling) {
016        super(0x65, brightness, speed, numLed, sparking, cooling);
017    }
018    /**
019     * Constructor for a FireAnimation.
020     * Call individual setters to tune the parameters further
021     */
022    public FireAnimation() {
023        this(1, 1, -1, 1, 1);
024    }
025    /**
026     * Sets the sparking value of the FireAnimation
027     * @param sparking The rate at which the Fire "Sparks" [0, 1]
028     */
029    public void setSparking(double sparking) {
030        setParam4(sparking);
031    }
032    /**
033     * Sets the cooling value of the FireAnimation
034     * @param cooling The rate at which the Fire "Cools" [0, 1]
035     */
036    public void setCooling(double cooling) {
037        setParam5(cooling);
038    }
039}