Package com.ctre.phoenix.led
Class RainbowAnimation
java.lang.Object
com.ctre.phoenix.led.Animation
com.ctre.phoenix.led.RainbowAnimation
public class RainbowAnimation extends Animation
Animation that creates a rainbow throughout all the LEDs
-
Constructor Summary
Constructors Constructor Description RainbowAnimation()
Constructor for a RainbowAnimation Call the individual setters to tune the Rainbow animation furtherRainbowAnimation(double brightness, double speed, int numLed)
Constructor for a RainbowAnimationRainbowAnimation(double brightness, double speed, int numLed, boolean reverseDirection, int ledOffset)
Constructor for a RainbowAnimation -
Method Summary
Modifier and Type Method Description com.ctre.phoenix.led.BaseStandardAnimation
getBaseStandardAnimation()
com.ctre.phoenix.led.BaseTwoSizeAnimation
getBaseTwoSizeAnimation()
void
setBrightness(double brightness)
Sets the brightness of this animation
-
Constructor Details
-
RainbowAnimation
public RainbowAnimation(double brightness, double speed, int numLed, boolean reverseDirection, int ledOffset)Constructor for a RainbowAnimation- Parameters:
brightness
- The brightness of the LEDs [0, 1]speed
- How fast the rainbow travels through the leds [0, 1]numLed
- How many LEDs are controlled by the CANdlereverseDirection
- True to reverse the animation direction, so instead of going "toward" the CANdle, it will go "away" from the CANdle.ledOffset
- Where to start the animation
-
RainbowAnimation
Constructor for a RainbowAnimation- Parameters:
brightness
- The brightness of the LEDs [0, 1]speed
- How fast the rainbow travels through the leds [0, 1]numLed
- How many LEDs are controlled by the CANdle
-
RainbowAnimation
public RainbowAnimation()Constructor for a RainbowAnimation Call the individual setters to tune the Rainbow animation further
-
-
Method Details
-
setBrightness
public void setBrightness(double brightness)Sets the brightness of this animation- Parameters:
brightness
- The brightness to run the animation at. This is a scalar from [0, 1]
-
getBaseStandardAnimation
public com.ctre.phoenix.led.BaseStandardAnimation getBaseStandardAnimation() -
getBaseTwoSizeAnimation
public com.ctre.phoenix.led.BaseTwoSizeAnimation getBaseTwoSizeAnimation()
-