Class Animation

java.lang.Object
com.ctre.phoenix.led.Animation
Direct Known Subclasses:
ColorFlowAnimation, FireAnimation, LarsonAnimation, RainbowAnimation, RgbFadeAnimation, SingleFadeAnimation, StrobeAnimation, TwinkleAnimation, TwinkleOffAnimation

@Deprecated(since="2026", forRemoval=true) public abstract class Animation extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
This device's Phoenix 5 API is deprecated for removal in the 2027 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

The base class for all animations that CANdle supports.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Animation(int idx, double speed, int numLed, int ledOffset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor for an Animation class
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setLedOffset(int ledOffset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets where the animation will start along the LED strip
    void
    setNumLed(int numLed)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the number of LEDs the animation will run on
    void
    setSpeed(double speed)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the speed of the animation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Animation

      public Animation(int idx, double speed, int numLed, int ledOffset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor for an Animation class
      Parameters:
      idx - The animation-specific ID
      speed - The rate at which the animation runs at. Higher is generally faster
      numLed - The number of LEDs to run the animation on
      ledOffset - Where to start the animation
  • Method Details

    • setSpeed

      public void setSpeed(double speed)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the speed of the animation
      Parameters:
      speed - The rate at which the animation runs at. Higher is generally faster
    • setNumLed

      public void setNumLed(int numLed)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the number of LEDs the animation will run on
      Parameters:
      numLed - The number of LEDs to run the animation on
    • setLedOffset

      public void setLedOffset(int ledOffset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets where the animation will start along the LED strip
      Parameters:
      ledOffset - Where to start the animation