Animation that sends a pocket of light across the LED strip.  
 More...
#include <ctre/phoenix/led/LarsonAnimation.h>
 | 
|   | LarsonAnimation (int r, int g, int b, int w=0, double speed=1, int numLed=-1, BounceMode mode=BounceMode::Front, int size=2, int ledOffset=0) | 
|   | Constructor for a LarsonAnimation.  More...
  | 
|   | 
| void  | SetBounceMode (BounceMode mode) | 
|   | Sets the bounce mode of the animation.  More...
  | 
|   | 
| void  | SetSize (int size) | 
|   | Sets the size of the pocket of LEDs.  More...
  | 
|   | 
|   | BaseTwoSizeAnimation (int idx, int r, int g, int b, int w, double speed, int numLed, int direction, int size, int ledOffset) | 
|   | Constructor for the BaseStandardAnimation object.  More...
  | 
|   | 
|   | ~BaseTwoSizeAnimation () | 
|   | 
| BaseStandardAnimation *  | GetBaseStandardAnimation () | 
|   | 
| BaseTwoSizeAnimation *  | GetBaseTwoSizeAnimation () | 
|   | 
| void  | SetR (int r) | 
|   | Sets the R value of the LEDs.  More...
  | 
|   | 
| void  | SetG (int g) | 
|   | Sets the G value of the LEDs.  More...
  | 
|   | 
| void  | SetB (int b) | 
|   | Sets the B value of the LEDs.  More...
  | 
|   | 
| void  | SetW (int w) | 
|   | Sets the W value of the LEDs.  More...
  | 
|   | 
| void  | SetDirection (int direction) | 
|   | 
| void  | SetSize (int size) | 
|   | 
| int  | GetR () | 
|   | 
| int  | GetG () | 
|   | 
| int  | GetB () | 
|   | 
| int  | GetW () | 
|   | 
| int  | GetDirection () | 
|   | 
| int  | GetSize () | 
|   | 
|   | Animation (int idx, double speed, int numLed, int ledOffset) | 
|   | Constructor for an Animation class.  More...
  | 
|   | 
| virtual  | ~Animation () | 
|   | 
| void  | SetSpeed (double speed) | 
|   | Sets the speed of the animation.  More...
  | 
|   | 
| void  | SetNumLed (int numLed) | 
|   | Sets the number of LEDs the animation will run on.  More...
  | 
|   | 
| void  | SetLedOffset (int ledOffset) | 
|   | Sets where the animation starts along the strip.  More...
  | 
|   | 
| virtual BaseStandardAnimation *  | GetBaseStandardAnimation ()=0 | 
|   | 
| virtual BaseTwoSizeAnimation *  | GetBaseTwoSizeAnimation ()=0 | 
|   | 
| int  | GetAnimationIdx () | 
|   | 
| double  | GetSpeed () | 
|   | 
| int  | GetNumLed () | 
|   | 
| int  | GetLedOffset () | 
|   | 
Animation that sends a pocket of light across the LED strip. 
 
◆ BounceMode
How the pocket of light behaves when it reaches the end of the strip. 
| Enumerator | 
|---|
| Front  | Bounce the pocket as soon as the first LED reaches the end of the strip.  
 | 
| Center  | Bounce the pocket once it is midway through the end of the strip.  
 | 
| Back  | Bounce the pocket once all the LEDs are off the strip.  
 | 
 
 
◆ LarsonAnimation()
      
        
          | ctre::phoenix::led::LarsonAnimation::LarsonAnimation  | 
          ( | 
          int  | 
          r,  | 
        
        
           | 
           | 
          int  | 
          g,  | 
        
        
           | 
           | 
          int  | 
          b,  | 
        
        
           | 
           | 
          int  | 
          w = 0,  | 
        
        
           | 
           | 
          double  | 
          speed = 1,  | 
        
        
           | 
           | 
          int  | 
          numLed = -1,  | 
        
        
           | 
           | 
          BounceMode  | 
          mode = BounceMode::Front,  | 
        
        
           | 
           | 
          int  | 
          size = 2,  | 
        
        
           | 
           | 
          int  | 
          ledOffset = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor for a LarsonAnimation. 
- Parameters
 - 
  
    | r | How much red should the color have [0, 255]  | 
    | g | How much green should the color have [0, 255]  | 
    | b | How much blue should the color have [0, 255]  | 
    | w | How much white should the color have [0, 255]  | 
    | speed | How fast should the color travel the strip [0, 1]  | 
    | numLed | The number of LEDs the CANdle will control  | 
    | mode | How the pocket of LEDs will behave once it reaches the end of the strip  | 
    | size | How large the pocket of LEDs are [0, 7]  | 
    | ledOffset | Where to start the animation  | 
  
   
 
 
◆ SetBounceMode()
      
        
          | void ctre::phoenix::led::LarsonAnimation::SetBounceMode  | 
          ( | 
          BounceMode  | 
          mode | ) | 
           | 
        
      
 
Sets the bounce mode of the animation. 
- Parameters
 - 
  
    | mode | How the pocket of LEDs will behave once it reaches the end of the strip  | 
  
   
 
 
◆ SetSize()
      
        
          | void ctre::phoenix::led::LarsonAnimation::SetSize  | 
          ( | 
          int  | 
          size | ) | 
           | 
        
      
 
Sets the size of the pocket of LEDs. 
- Parameters
 - 
  
    | size | The size of the pocket [0, 7]  | 
  
   
 
 
The documentation for this class was generated from the following file: